~snappy-dev/snappy/15.04-github

« back to all changes in this revision

Viewing changes to integration-tests/testutils/config/config_test.go

  • Committer: Michael Vogt
  • Date: 2016-05-20 07:33:30 UTC
  • mfrom: (739.1.2)
  • Revision ID: git-v1:cb4764632e9c993b060d58904480d8cddcac7f73
Merge pull request #1178 from fgimenez/add-http-proxy

integration-tests: update 15.04 branch from master to accept http-proxy flag

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
}
46
46
 
47
47
func testConfigStruct(fileName string) *Config {
48
 
        return NewConfig(
 
48
        return &Config{
49
49
                fileName,
50
50
                "testrelease", "testchannel",
51
 
                true, true, true)
 
51
                true, true, true, true}
52
52
}
53
53
func testConfigContents(fileName string) string {
54
54
        return `{` +
57
57
                `"Channel":"testchannel",` +
58
58
                `"RemoteTestbed":true,` +
59
59
                `"Update":true,` +
60
 
                `"Rollback":true` +
 
60
                `"Rollback":true,` +
 
61
                `"FromBranch":true` +
61
62
                `}`
62
63
}
63
64
 
101
102
                `"Channel":"testchannel",` +
102
103
                `"RemoteTestbed":false,` +
103
104
                `"Update":true,` +
104
 
                `"Rollback":true` +
 
105
                `"Rollback":true,` +
 
106
                `"FromBranch":true` +
105
107
                `}`
106
108
 
107
109
        ioutil.WriteFile(configFileName, []byte(configContents), 0644)
108
110
 
109
111
        cfg, err := ReadConfig(configFileName)
110
112
 
111
 
        testConfigStruct := NewConfig(configFileName, "testrelease", "testchannel", false, true, true)
 
113
        testConfigStruct := &Config{configFileName, "testrelease", "testchannel", false, true, true, true}
112
114
 
113
115
        c.Assert(err, check.IsNil, check.Commentf("Error reading config: %v", err))
114
116
        c.Assert(cfg, check.DeepEquals, testConfigStruct)