~julian-edwards/gwacl/licence-readme-etc

« back to all changes in this revision

Viewing changes to xmlobjects_test.go

  • Committer: Julian Edwards
  • Date: 2013-07-18 01:45:02 UTC
  • mto: This revision was merged to the branch mainline in revision 189.
  • Revision ID: julian.edwards@canonical.com-20130718014502-1miug31yrzxklo1j
rename userdata to customdata

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
          <HostName>%s</HostName>
33
33
          <UserName>%s</UserName>
34
34
          <UserPassword>%s</UserPassword>
35
 
          <UserData>%s</UserData>
 
35
          <CustomData>%s</CustomData>
36
36
          <DisableSshPasswordAuthentication>%v</DisableSshPasswordAuthentication>
37
37
        </ConfigurationSet>`)
38
38
    expected := fmt.Sprintf(template, config.Hostname, config.Username,
39
 
        config.Password, config.UserData,
 
39
        config.Password, config.CustomData,
40
40
        config.DisableSSHPasswordAuthentication)
41
41
    c.Check(strings.TrimSpace(xml), Equals, strings.TrimSpace(expected))
42
42
}
161
161
              <HostName>%s</HostName>
162
162
              <UserName>%s</UserName>
163
163
              <UserPassword>%s</UserPassword>
164
 
              <UserData>%s</UserData>
 
164
              <CustomData>%s</CustomData>
165
165
              <DisableSshPasswordAuthentication>%v</DisableSshPasswordAuthentication>
166
166
            </ConfigurationSet>
167
167
          </ConfigurationSets>
169
169
        </Role>`)
170
170
    expected := fmt.Sprintf(template, role.RoleName,
171
171
        config.ConfigurationSetType, config.Hostname, config.Username,
172
 
        config.Password, config.UserData,
 
172
        config.Password, config.CustomData,
173
173
        config.DisableSSHPasswordAuthentication, role.RoleSize)
174
174
    c.Check(strings.TrimSpace(xml), Equals, strings.TrimSpace(expected))
175
175
}
714
714
                  <HostName>%s</HostName>
715
715
                  <UserName>%s</UserName>
716
716
                  <UserPassword>%s</UserPassword>
717
 
                  <UserData>%s</UserData>
 
717
                  <CustomData>%s</CustomData>
718
718
                  <DisableSshPasswordAuthentication>%v</DisableSshPasswordAuthentication>
719
719
                </ConfigurationSet>
720
720
              </ConfigurationSets>
735
735
    expected := fmt.Sprintf(template, deployment.Name,
736
736
        deployment.DeploymentSlot, deployment.Label,
737
737
        role.RoleName, config.ConfigurationSetType, config.Hostname,
738
 
        config.Username, config.Password, config.UserData,
 
738
        config.Username, config.Password, config.CustomData,
739
739
        config.DisableSSHPasswordAuthentication, role.RoleSize,
740
740
        deployment.VirtualNetworkName, dns.Name, dns.Address)
741
741
    c.Check(strings.TrimSpace(xml), Equals, strings.TrimSpace(expected))
1315
1315
    username := MakeRandomString(10)
1316
1316
    password := MakeRandomString(10)
1317
1317
    disablessh := BoolToString(MakeRandomBool())
1318
 
    userdata := MakeRandomString(10)
 
1318
    customdata := MakeRandomString(10)
1319
1319
 
1320
1320
    config := NewLinuxProvisioningConfigurationSet(
1321
 
        hostname, username, password, userdata, disablessh)
 
1321
        hostname, username, password, customdata, disablessh)
1322
1322
    c.Check(config.Hostname, Equals, hostname)
1323
1323
    c.Check(config.Username, Equals, username)
1324
1324
    c.Check(config.Password, Equals, password)
1325
 
    c.Check(config.UserData, Equals, userdata)
 
1325
    c.Check(config.CustomData, Equals, customdata)
1326
1326
    c.Check(config.DisableSSHPasswordAuthentication, Equals, disablessh)
1327
1327
    c.Check(config.ConfigurationSetType, Equals, "LinuxProvisioningConfiguration")
1328
1328
}