...

Source file src/edge-infra.dev/pkg/sds/lib/ci/dsds-sandboxes/schedule_test.go

Documentation: edge-infra.dev/pkg/sds/lib/ci/dsds-sandboxes

     1  package dsdssandboxes
     2  
     3  import (
     4  	"testing"
     5  
     6  	"gotest.tools/v3/assert"
     7  )
     8  
     9  func TestToLabelMap(t *testing.T) {
    10  	expectedLabelMap := map[string]string{
    11  		"vmautostartstopweekday": "08-20",
    12  		"vmautostartstopweekend": "false-18",
    13  		"vmtz":                   "utc",
    14  	}
    15  
    16  	schedule := Schedule{
    17  		WeekendStart: nil,
    18  		WeekendStop:  intPointer(18),
    19  		WeekdayStart: intPointer(8),
    20  		WeekdayStop:  intPointer(20),
    21  		Timezone:     "utc",
    22  	}
    23  
    24  	assert.DeepEqual(
    25  		t,
    26  		expectedLabelMap,
    27  		schedule.ToLabelMap(),
    28  	)
    29  }
    30  

View as plain text