Merge lp:~elopio/snappy/fix_info_test into lp:~snappy-dev/snappy/snappy-moved-to-github

Proposed by Leo Arias
Status: Merged
Approved by: Federico Gimenez
Approved revision: 613
Merged at revision: 613
Proposed branch: lp:~elopio/snappy/fix_info_test
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Diff against target: 25 lines (+4/-3)
1 file modified
_integration-tests/helpers/common/common.go (+4/-3)
To merge this branch: bzr merge lp:~elopio/snappy/fix_info_test
Reviewer Review Type Date Requested Status
Federico Gimenez (community) Approve
Review via email: mp+266014@code.launchpad.net

Commit message

Fix the assign to the global integration tests config.

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote :

we were doing a local assignment, so the info test never get the config we read on the setup.

lp:~elopio/snappy/fix_info_test updated
613. By Leo Arias

Fixed typo.

Revision history for this message
Federico Gimenez (fgimenez) wrote :

Thanks! :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '_integration-tests/helpers/common/common.go'
2--- _integration-tests/helpers/common/common.go 2015-07-24 16:39:21 +0000
3+++ _integration-tests/helpers/common/common.go 2015-07-27 17:41:09 +0000
4@@ -41,9 +41,9 @@
5 channelCfgFile = "/etc/system-image/channel.ini"
6 )
7
8-// Cfg is a struct that contains the configurations values passed from the
9+// Cfg is a struct that contains the configuration values passed from the
10 // host to the testbed.
11-var Cfg config.Config
12+var Cfg *config.Config
13
14 // SnappySuite is a structure used as a base test suite for all the snappy
15 // integration tests.
16@@ -57,7 +57,8 @@
17 ExecCommand(c, "sudo", "systemctl", "stop", "snappy-autopilot.timer")
18 ExecCommand(c, "sudo", "systemctl", "disable", "snappy-autopilot.timer")
19 if !isInRebootProcess() {
20- Cfg, err := config.ReadConfig(
21+ var err error
22+ Cfg, err = config.ReadConfig(
23 "_integration-tests/data/output/testconfig.json")
24 c.Assert(err, check.IsNil, check.Commentf("Error reading config: %v", err))
25 if Cfg.Update || Cfg.Rollback {

Subscribers

People subscribed via source and target branches