func TestNodeBalancerConfigListOK(t *testing.T) {
	c, ts := clientFor(newMockAPIServer(t, mockNodeBalancerConfigListOK()))
	defer ts.Close()

	nbconfs, err := c.NodeBalancerConfigList(13128, Int(14591))
	require.NoError(t, err)
	require.Len(t, nbconfs, 1)

	nbc := nbconfs[0]
	assert.Equal(t, "http_cookie", nbc.Stickiness)
	assert.Equal(t, "", nbc.SSLCommonName)
	assert.Equal(t, "/foo", nbc.CheckPath)
	assert.Equal(t, "bar", nbc.CheckBody)
	assert.Equal(t, 30, nbc.CheckInterval)
	assert.Equal(t, "", nbc.SSLFingerprint)
	assert.Equal(t, "roundrobin", nbc.Algorithm)
	assert.Equal(t, 14591, nbc.ID)
	assert.Equal(t, 15, nbc.CheckAttempts)
	assert.Equal(t, 13128, nbc.NodeBalancerID)
	assert.Equal(t, 80, nbc.Port)
	assert.Equal(t, "http", nbc.Check)
	assert.False(t, nbc.CheckPassive)
	assert.Equal(t, "http", nbc.Protocol)
	assert.Equal(t, 29, nbc.CheckTimeout)
}
Beispiel #2
0
func TestLinodeJobListNotFinished(t *testing.T) {
	c, ts := clientFor(newMockAPIServer(t, mockLinodeJobListNotFinished()))
	defer ts.Close()

	jobs, err := c.LinodeJobList(1139016, Int(25088076), nil)
	require.NoError(t, err)
	require.Len(t, jobs, 1)

	j := jobs[0]

	assert.False(t, j.Done())
	assert.False(t, j.Success())

	assert.Equal(t, "2015-07-03 23:24:12.0", j.EnteredDT)
	assert.Equal(t, "fs.create", j.Action)
	assert.Equal(t, "Create Filesystem - test-swap", j.Label)
	assert.Equal(t, "", j.HostStartDT)
	assert.Equal(t, 1139016, j.LinodeID)
	assert.Equal(t, "", j.HostFinishDT)
	assert.Equal(t, 0, j.Duration)
	assert.Equal(t, "", j.HostMessage)
	assert.Equal(t, 25087627, j.ID)
	assert.Equal(t, false, j.HostSuccess)
}
Beispiel #3
0
func TestStackScriptIntegration(t *testing.T) {
	c := NewClient(apiKey)

	ssID, err := c.StackScriptCreate("test", "130,", "#! /bin/bash foo", String("foo"),
		Bool(false), String("bar"))
	require.NoError(t, err)
	require.NotEmpty(t, ssID)

	ssList, err := c.StackScriptList(Int(ssID))
	require.NoError(t, err)
	require.Len(t, ssList, 1)

	ss := ssList[0]
	assert.Equal(t, "bar", ss.RevNote)
	assert.Equal(t, "#! /bin/bash foo", ss.Script)
	assert.Equal(t, "130,", ss.DistIDList)
	assert.Equal(t, "foo", ss.Description)
	assert.NotEmpty(t, ss.RevDT)
	assert.Equal(t, "test", ss.Label)
	assert.Equal(t, 0, ss.TotalDeploys)
	assert.NotEmpty(t, ss.LatestRev)
	assert.Equal(t, ssID, ss.ID)
	assert.False(t, ss.IsPublic)
	assert.Equal(t, 0, ss.ActiveDeploys)
	assert.NotEmpty(t, ss.CreateDT)
	assert.NotEmpty(t, ss.UserID)

	err = c.StackScriptUpdate(ssID, String("test-2"), String("quux"), String("129,130"), Bool(true),
		String("baz"), String("#! /bin/bash baz"))
	require.NoError(t, err)

	ssList, err = c.StackScriptList(Int(ssID))
	require.NoError(t, err)
	require.Len(t, ssList, 1)

	ss = ssList[0]
	assert.Equal(t, "baz", ss.RevNote)
	assert.Equal(t, "#! /bin/bash baz", ss.Script)
	assert.Equal(t, "129,130", ss.DistIDList)
	assert.Equal(t, "quux", ss.Description)
	assert.Equal(t, "test-2", ss.Label)
	assert.Equal(t, ssID, ss.ID)
	assert.True(t, ss.IsPublic)

	err = c.StackScriptDelete(ssID)
	require.NoError(t, err)
}
Beispiel #4
0
func TestNodeBalancerIntegration(t *testing.T) {
	c := NewClient(apiKey)

	t.Log("creating test linode...")
	linodeID, err := c.LinodeCreate(2, 1, nil)
	require.NoError(t, err)
	require.NotEmpty(t, linodeID)

	err = c.WaitForAllJobs(linodeID, 3*time.Second, 60*time.Second)
	require.NoError(t, err)

	t.Log("assigning private IP...")
	_, linodeIP, err := c.LinodeIPAddPrivate(linodeID)
	require.NoError(t, err)
	require.NotEmpty(t, linodeIP)

	t.Log("nodebalancer.create...")
	nbID, err := c.NodeBalancerCreate(2, String("testing"), Int(5))
	require.NoError(t, err)
	require.NotEmpty(t, nbID)

	t.Log("nodebalancer.list...")
	nbList, err := c.NodeBalancerList(Int(nbID))
	require.NoError(t, err)
	require.Len(t, nbList, 1)

	n := nbList[0]
	assert.NotEmpty(t, n.Hostname)
	assert.Equal(t, "testing", n.Label)
	assert.Equal(t, 5, n.Throttle)
	assert.Equal(t, 2, n.DatacenterID)
	assert.NotEmpty(t, n.IPv4Addr)
	assert.NotEmpty(t, n.IPv6Addr)
	assert.Equal(t, nbID, n.ID)

	t.Log("nodebalancer.update...")
	err = c.NodeBalancerUpdate(nbID, String("testing-2"), Int(10))
	require.NoError(t, err)

	t.Log("nodebalancer.list...")
	nbList, err = c.NodeBalancerList(Int(nbID))
	require.NoError(t, err)
	require.Len(t, nbList, 1)

	n = nbList[0]
	assert.Equal(t, "testing-2", n.Label)
	assert.Equal(t, 10, n.Throttle)
	assert.Equal(t, nbID, n.ID)

	nbcco := NodeBalancerConfigCreateOpts{
		Port:          Int(80),
		Protocol:      String("http"),
		Algorithm:     String("roundrobin"),
		Stickiness:    String("http_cookie"),
		Check:         String("http"),
		CheckInterval: Int(30),
		CheckTimeout:  Int(29),
		CheckAttempts: Int(15),
		CheckPath:     String("/foo"),
		CheckBody:     String("bar"),
		CheckPassive:  Bool(false),
	}

	t.Log("nodebalancer.config.create...")
	confID, err := c.NodeBalancerConfigCreate(nbID, nbcco)
	require.NoError(t, err)
	require.NotEmpty(t, confID)

	t.Log("nodebalancer.config.list...")
	nbconfs, err := c.NodeBalancerConfigList(nbID, Int(confID))
	require.NoError(t, err)
	require.Len(t, nbconfs, 1)

	nbc := nbconfs[0]
	assert.Equal(t, "http_cookie", nbc.Stickiness)
	assert.Equal(t, "", nbc.SSLCommonName)
	assert.Equal(t, "/foo", nbc.CheckPath)
	assert.Equal(t, "bar", nbc.CheckBody)
	assert.Equal(t, 30, nbc.CheckInterval)
	assert.Equal(t, "", nbc.SSLFingerprint)
	assert.Equal(t, "roundrobin", nbc.Algorithm)
	assert.Equal(t, confID, nbc.ID)
	assert.Equal(t, 15, nbc.CheckAttempts)
	assert.Equal(t, nbID, nbc.NodeBalancerID)
	assert.Equal(t, 80, nbc.Port)
	assert.Equal(t, "http", nbc.Check)
	assert.False(t, nbc.CheckPassive)
	assert.Equal(t, "http", nbc.Protocol)
	assert.Equal(t, 29, nbc.CheckTimeout)

	nbcuo := NodeBalancerConfigUpdateOpts{
		Port:          Int(90),
		Protocol:      String("https"),
		Algorithm:     String("leastconn"),
		Stickiness:    String("table"),
		Check:         String("http_body"),
		CheckInterval: Int(24),
		CheckTimeout:  Int(23),
		CheckAttempts: Int(20),
		CheckPath:     String("/bar"),
		CheckBody:     String("quux"),
		CheckPassive:  Bool(true),
		SSLCert:       String(sslCert),
		SSLKey:        String(sslKey),
	}

	t.Log("nodebalancer.config.update...")
	err = c.NodeBalancerConfigUpdate(confID, nbcuo)
	require.NoError(t, err)

	t.Log("nodebalancer.config.list...")
	nbconfs, err = c.NodeBalancerConfigList(nbID, Int(confID))
	require.NoError(t, err)
	require.Len(t, nbconfs, 1)

	nbc = nbconfs[0]
	assert.Equal(t, "table", nbc.Stickiness)
	assert.Equal(t, "foo.com", nbc.SSLCommonName)
	assert.Equal(t, "/bar", nbc.CheckPath)
	assert.Equal(t, "quux", nbc.CheckBody)
	assert.Equal(t, 24, nbc.CheckInterval)
	assert.Equal(t, "0B:40:09:0C:4E:DA:5B:FB:2A:31:69:C9:4D:80:AE:CE:76:8F:DA:60", nbc.SSLFingerprint)
	assert.Equal(t, "leastconn", nbc.Algorithm)
	assert.Equal(t, confID, nbc.ID)
	assert.Equal(t, 20, nbc.CheckAttempts)
	assert.Equal(t, nbID, nbc.NodeBalancerID)
	assert.Equal(t, 90, nbc.Port)
	assert.Equal(t, "http_body", nbc.Check)
	assert.True(t, nbc.CheckPassive)
	assert.Equal(t, "https", nbc.Protocol)
	assert.Equal(t, 23, nbc.CheckTimeout)

	t.Log("nodebalancer.node.create...")
	nbNodeID, err := c.NodeBalancerNodeCreate(confID, "test", linodeIP+":90", Int(50),
		String("accept"))
	require.NoError(t, err)
	require.NotEmpty(t, nbNodeID)

	t.Log("nodebalancer.node.list...")
	nbNodes, err := c.NodeBalancerNodeList(confID, Int(nbNodeID))
	require.NoError(t, err)
	require.Len(t, nbNodes, 1)

	node := nbNodes[0]
	assert.Equal(t, 50, node.Weight)
	assert.Equal(t, linodeIP+":90", node.Address)
	assert.Equal(t, "test", node.Label)
	assert.Equal(t, nbNodeID, node.ID)
	assert.Equal(t, "accept", node.Mode)
	assert.Equal(t, confID, node.ConfigID)
	assert.NotEmpty(t, node.Status)
	assert.Equal(t, nbID, node.NodeBalancerID)

	t.Log("nodebalancer.node.update...")
	err = c.NodeBalancerNodeUpdate(nbNodeID, String("test-2"), String(linodeIP+":80"),
		Int(60), String("reject"))
	require.NoError(t, err)

	t.Log("nodebalancer.node.list...")
	nbNodes, err = c.NodeBalancerNodeList(confID, Int(nbNodeID))
	require.NoError(t, err)
	require.Len(t, nbNodes, 1)

	node = nbNodes[0]
	assert.Equal(t, 60, node.Weight)
	assert.Equal(t, linodeIP+":80", node.Address)
	assert.Equal(t, "test-2", node.Label)
	assert.Equal(t, nbNodeID, node.ID)
	assert.Equal(t, "reject", node.Mode)
	assert.Equal(t, confID, node.ConfigID)
	assert.NotEmpty(t, node.Status)
	assert.Equal(t, nbID, node.NodeBalancerID)

	t.Log("nodebalancer.node.delete...")
	err = c.NodeBalancerNodeDelete(nbNodeID)
	require.NoError(t, err)

	t.Log("nodebalancer.config.delete...")
	err = c.NodeBalancerConfigDelete(nbID, confID)
	require.NoError(t, err)

	t.Log("nodebalancer.delete...")
	err = c.NodeBalancerDelete(nbID)
	require.NoError(t, err)

	t.Log("deleting test linode...")
	err = c.LinodeDelete(linodeID, Bool(true))
	require.NoError(t, err)
}
Beispiel #5
0
func TestImageIntegration(t *testing.T) {
	c := NewClient(apiKey)

	t.Log("creating test linode...")
	linodeID, err := c.LinodeCreate(2, 1, nil)
	require.NoError(t, err)
	require.NotEmpty(t, linodeID)

	err = c.WaitForAllJobs(linodeID, 3*time.Second, 60*time.Second)
	require.NoError(t, err)

	t.Log("creating test disk...")
	jobID, dDiskID, err := c.LinodeDiskCreateFromDistribution(linodeID, 130, "test-image", 600,
		rootPass, nil)
	require.NoError(t, err)
	require.NotEmpty(t, dDiskID)
	require.NotEmpty(t, jobID)

	ok, err := c.WaitForJob(linodeID, jobID, 3*time.Second, 60*time.Second)
	require.NoError(t, err)
	require.True(t, ok)

	t.Log("converting test disk to image...")
	jobID, imageID, err := c.LinodeDiskImagize(linodeID, dDiskID, String("foo"), String("bar"))
	require.NoError(t, err)
	require.NotEmpty(t, imageID)
	require.NotEmpty(t, jobID)

	ok, err = c.WaitForJob(linodeID, jobID, 3*time.Second, 120*time.Second)
	require.NoError(t, err)
	require.True(t, ok)

	t.Log("image.list...")
	images, err := c.ImageList(&imageID, Bool(false))
	require.NoError(t, err)
	require.Len(t, images, 1)

	i := images[0]
	assert.Empty(t, i.LastUsedDT)
	assert.Equal(t, 600, i.MinSize)
	assert.Equal(t, "foo", i.Description)
	assert.Equal(t, "bar", i.Label)
	assert.NotEmpty(t, i.Creator)
	assert.Equal(t, "available", i.Status)
	assert.False(t, i.IsPublic)
	assert.NotEmpty(t, i.CreateDT)
	assert.Equal(t, "manual", i.Type)
	assert.Equal(t, "ext4", i.FSType)
	assert.Equal(t, imageID, i.ID)

	t.Log("image.update...")
	err = c.ImageUpdate(imageID, String("baz"), String("quux"))
	require.NoError(t, err)

	t.Log("image.list...")
	images, err = c.ImageList(&imageID, Bool(false))
	require.NoError(t, err)
	require.Len(t, images, 1)

	i = images[0]
	assert.Equal(t, "baz", i.Label)
	assert.Equal(t, "quux", i.Description)

	t.Log("image.delete...")
	err = c.ImageDelete(imageID)
	require.NoError(t, err)

	t.Log("cleaning up linode...")
	err = c.LinodeDelete(linodeID, Bool(true))
	require.NoError(t, err)
}
Beispiel #6
0
func TestLinodeIntegration(t *testing.T) {
	c := NewClient(apiKey)

	t.Log("c.LinodeCreate...")
	id, err := c.LinodeCreate(2, 1, nil)
	require.NoError(t, err)
	require.NotEmpty(t, id)

	t.Log("c.WaitForAllJobs...")
	err = c.WaitForAllJobs(id, 2*time.Second, 60*time.Second)
	require.NoError(t, err)

	t.Log("c.LinodeList...")
	nodes, err := c.LinodeList(Int(id))
	require.NoError(t, err)
	require.Len(t, nodes, 1)

	t.Log("c.LinodeResize...")
	err = c.LinodeResize(id, 2)
	require.NoError(t, err)

	t.Log("c.LinodeUpdate...")
	linodeOpts := LinodeOpts{
		Label:                 String("integration-test"),
		DisplayGroup:          String("tests"),
		AlertCPUEnabled:       Bool(false),
		AlertCPUThreshold:     Int(50),
		AlertDiskIOEnabled:    Bool(false),
		AlertDiskIOThreshold:  Int(500),
		AlertBWInEnabled:      Bool(false),
		AlertBWInThreshold:    Int(30),
		AlertBWOutEnabled:     Bool(false),
		AlertBWOutThreshold:   Int(31),
		AlertBWQuotaEnabled:   Bool(false),
		AlertBWQuotaThreshold: Int(55),
		BackupWindow:          Int(3),
		BackupWeeklyDay:       Int(6),
		Watchdog:              Bool(false),
	}
	err = c.LinodeUpdate(id, linodeOpts)
	require.NoError(t, err)

	t.Log("c.LinodeDiskCreate...")
	jobID, swapDiskID, err := c.LinodeDiskCreate(id, "test-swap", "swap", 256)
	require.NoError(t, err)
	require.NotEmpty(t, swapDiskID, "swapDiskID")
	require.NotEmpty(t, jobID, "jobID")

	t.Log("c.WaitForJob...")
	ok, err := c.WaitForJob(id, jobID, 2*time.Second, 60*time.Second)
	require.NoError(t, err)
	require.True(t, ok, "creating swap failed")

	t.Log("c.LinodeDiskCreateFromDistribution...")
	jobID, distDiskID, err := c.LinodeDiskCreateFromDistribution(id, 130, "test-dist", 600,
		rootPass, String(rootSSHKey))
	require.NoError(t, err)
	require.NotEmpty(t, jobID)
	require.NotEmpty(t, distDiskID)

	t.Log("c.WaitForJob...")
	ok, err = c.WaitForJob(id, jobID, 2*time.Second, 80*time.Second)
	require.NoError(t, err)
	require.True(t, ok)

	t.Log("c.LinodeConfigCreate...")
	lcco := LinodeConfigCreateOpts{
		Comments:              String("foo"),
		RAMLimit:              Int(800),
		VirtMode:              String("paravirt"),
		RunLevel:              String("default"),
		RootDeviceNum:         Int(1),
		RootDeviceRO:          Bool(true),
		HelperDisableUpdateDB: Bool(true),
		HelperDistro:          Bool(true),
		HelperXen:             Bool(true),
		HelperDepmod:          Bool(true),
		HelperNetwork:         Bool(true),
		DevTmpFSAutomount:     Bool(true),
	}
	diskList := strconv.Itoa(distDiskID) + "," + strconv.Itoa(swapDiskID) + ","
	confID, err := c.LinodeConfigCreate(id, 138, "test-conf1", diskList, lcco)
	require.NoError(t, err)
	require.NotEmpty(t, confID)

	t.Log("c.LinodeConfigList...")
	confs, err := c.LinodeConfigList(id, Int(confID))
	require.NoError(t, err)
	require.Len(t, confs, 1)

	cfg := confs[0]
	assert.Equal(t, "", cfg.RootDeviceCustom)
	assert.Equal(t, "foo", cfg.Comments)
	assert.Equal(t, "test-conf1", cfg.Label)
	assert.Equal(t, confID, cfg.ID)
	assert.NotEmpty(t, cfg.DiskList)
	assert.Equal(t, "default", cfg.RunLevel)
	assert.Equal(t, 1, cfg.RootDeviceNum)
	assert.Equal(t, 800, cfg.RAMLimit)
	assert.Equal(t, "paravirt", cfg.VirtMode)
	assert.Equal(t, id, cfg.LinodeID)
	assert.Equal(t, 138, cfg.KernelID)
	assert.True(t, cfg.DevTmpFSAutomount)
	assert.True(t, cfg.HelperDistro)
	assert.True(t, cfg.HelperDisableUpdateDB)
	assert.True(t, cfg.HelperDepmod)
	assert.True(t, cfg.HelperXen)
	assert.True(t, cfg.RootDeviceRO)
	assert.True(t, cfg.HelperNetwork)
	assert.False(t, cfg.IsRescue)

	t.Log("c.LinodeConfigUpdate...")
	lcuo := LinodeConfigUpdateOpts{
		LinodeID:              Int(id),
		KernelID:              Int(138),
		Comments:              String("foo"),
		RAMLimit:              Int(800),
		VirtMode:              String("paravirt"),
		RunLevel:              String("default"),
		RootDeviceNum:         Int(1),
		RootDeviceRO:          Bool(true),
		HelperDisableUpdateDB: Bool(true),
		HelperDistro:          Bool(true),
		HelperXen:             Bool(true),
		HelperDepmod:          Bool(true),
		HelperNetwork:         Bool(true),
		DevTmpFSAutomount:     Bool(true),
	}
	err = c.LinodeConfigUpdate(confID, lcuo)
	require.NoError(t, err)

	t.Log("c.LinodeDiskImagize...")
	jobID, imgID, err := c.LinodeDiskImagize(id, distDiskID, String("test-image desc"),
		String("test-image label"))
	require.NoError(t, err)
	require.NotEmpty(t, jobID)
	require.NotEmpty(t, imgID)

	t.Log("c.WaitForJob...")
	ok, err = c.WaitForJob(id, jobID, 2*time.Second, 120*time.Second)
	require.NoError(t, err)
	require.True(t, ok)

	t.Log("c.LinodeDiskCreateFromImage...")
	jobID, imgDiskID, err := c.LinodeDiskCreateFromImage(imgID, id, "test-image", Int(800),
		String(rootPass), String(rootSSHKey))
	require.NoError(t, err)
	require.NotEmpty(t, jobID)
	require.NotEmpty(t, imgDiskID)

	t.Log("c.WaitForJob...")
	ok, err = c.WaitForJob(id, jobID, 2*time.Second, 120*time.Second)
	require.NoError(t, err)
	require.True(t, ok)

	t.Log("deleting image...")
	err = c.ImageDelete(imgID)
	assert.NoError(t, err)

	t.Log("c.LinodeDiskDelete...")
	jobID, err = c.LinodeDiskDelete(id, imgDiskID)
	require.NoError(t, err)
	require.NotEmpty(t, jobID)

	t.Log("c.WaitForJob...")
	ok, err = c.WaitForJob(id, jobID, 2*time.Second, 60*time.Second)
	require.NoError(t, err)
	require.True(t, ok)

	t.Log("c.LinodeDiskDuplicate...")
	jobID, dupeDiskID, err := c.LinodeDiskDuplicate(id, swapDiskID)
	require.NoError(t, err)
	require.NotEmpty(t, dupeDiskID)
	require.NotEmpty(t, jobID)

	t.Log("c.WaitForJob...")
	ok, err = c.WaitForJob(id, jobID, 2*time.Second, 60*time.Second)
	require.NoError(t, err)
	require.True(t, ok)

	t.Log("c.LinodeDiskResize...")
	jobID, err = c.LinodeDiskResize(id, dupeDiskID, 512)
	require.NoError(t, err)
	require.NotEmpty(t, jobID)

	t.Log("c.WaitForJob...")
	ok, err = c.WaitForJob(id, jobID, 1*time.Second, 60*time.Second)
	require.NoError(t, err)
	require.True(t, ok)

	t.Log("c.LinodeDiskUpdate...")
	err = c.LinodeDiskUpdate(id, dupeDiskID, String("updated-label"), Bool(true))
	require.NoError(t, err)

	curDisks, err := c.LinodeDiskList(id, nil)
	require.NoError(t, err)
	require.Len(t, curDisks, 3)

	t.Log("c.LinodeIPList...")
	ipList, err := c.LinodeIPList(Int(id), nil)
	require.NoError(t, err)
	require.Len(t, ipList, 1)
	pubID := ipList[0].ID

	t.Log("c.LinodeIPAddPrivate...")
	_, _, err = c.LinodeIPAddPrivate(id)
	require.NoError(t, err)

	t.Log("c.LinodeIPList...")
	ipList, err = c.LinodeIPList(Int(id), nil)
	require.NoError(t, err)
	require.Len(t, ipList, 2)

	t.Log("c.LinodeClone...")
	cloneID, err := c.LinodeClone(id, 2, 1, nil, nil)
	require.NoError(t, err)
	require.NotEmpty(t, cloneID)

	t.Log("c.WaitForAllJobs...")
	err = c.WaitForAllJobs(cloneID, 2*time.Second, 60*time.Second)
	require.NoError(t, err)

	t.Log("c.LinodeIPList...")
	ipList, err = c.LinodeIPList(Int(cloneID), nil)
	require.NoError(t, err)
	require.Len(t, ipList, 1)
	clonePubID := ipList[0].ID

	t.Log("c.LinodeIPSwap...")
	err = c.LinodeIPSwap(pubID, Int(clonePubID), nil)
	require.NoError(t, err)

	t.Log("c.WaitForAllJobs...")
	err = c.WaitForAllJobs(cloneID, 2*time.Second, 60*time.Second)
	require.NoError(t, err)

	t.Log("c.LinodeDelete...")
	err = c.LinodeDelete(cloneID, Bool(true))
	require.NoError(t, err)

	ssOpts := struct {
		DBPassword    string `json:"db_password"`
		DBName        string `json:"db_name"`
		MySQLUsername string `json:"db_user"`
		MySQLUserpass string `json:"db_user_password"`
	}{
		"foo",
		"bar",
		"baz",
		"quux",
	}
	ssUDFResp, err := json.Marshal(ssOpts)
	require.NoError(t, err)

	t.Log("c.DiskCreateFromStackScript")
	jobID, diskID, err := c.LinodeDiskCreateFromStackScript(id, linodeLampStackSS, string(ssUDFResp),
		130, "test-ss", 600, rootPass, String(rootSSHKey))
	require.NoError(t, err)
	require.NotEmpty(t, jobID)
	require.NotEmpty(t, diskID)

	t.Log("c.WaitForJob...")
	ok, err = c.WaitForJob(id, jobID, 2*time.Second, 120*time.Second)
	require.NoError(t, err)
	require.True(t, ok)

	t.Log("c.LinodeBoot...")
	jobID, err = c.LinodeBoot(id, Int(confID))
	require.NoError(t, err)
	require.NotEmpty(t, jobID)

	t.Log("c.WaitForJob...")
	ok, err = c.WaitForJob(id, jobID, 2*time.Second, 120*time.Second)
	require.NoError(t, err)
	require.True(t, ok)

	t.Log("c.LinodeReboot...")
	jobID, err = c.LinodeReboot(id, Int(confID))
	require.NoError(t, err)
	require.NotEmpty(t, jobID)

	t.Log("c.WaitForJob...")
	ok, err = c.WaitForJob(id, jobID, 2*time.Second, 120*time.Second)
	require.NoError(t, err)
	require.True(t, ok)

	t.Log("c.LinodeShutdown...")
	jobID, err = c.LinodeShutdown(id)
	require.NoError(t, err)
	require.NotEmpty(t, jobID)

	t.Log("c.WaitForJob...")
	ok, err = c.WaitForJob(id, jobID, 2*time.Second, 120*time.Second)
	require.NoError(t, err)
	require.True(t, ok)

	err = c.LinodeConfigDelete(id, confID)
	require.NoError(t, err)

	t.Log("c.LinodeDelete...")
	err = c.LinodeDelete(id, Bool(true))

}