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

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 587
Merged at revision: 587
Proposed branch: lp:~elopio/snappy/test_go_apt
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Diff against target: 53 lines (+39/-4)
2 files modified
_integration-tests/tests/03_test_apt (+0/-4)
_integration-tests/tests/latest/apt_test.go (+39/-0)
To merge this branch: bzr merge lp:~elopio/snappy/test_go_apt
Reviewer Review Type Date Requested Status
Federico Gimenez (community) Approve
Review via email: mp+265075@code.launchpad.net

Commit message

Translated the apt integration test to go.

To post a comment you must log in.
Revision history for this message
Federico Gimenez (fgimenez) wrote :

LGTM, thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file '_integration-tests/tests/03_test_apt'
2--- _integration-tests/tests/03_test_apt 2015-06-15 15:36:29 +0000
3+++ _integration-tests/tests/03_test_apt 1970-01-01 00:00:00 +0000
4@@ -1,4 +0,0 @@
5-test() {
6- T="Ubuntu Core does not use apt-get, see 'snappy --help'!"
7- test_equal "$T" apt-get update
8-}
9\ No newline at end of file
10
11=== added file '_integration-tests/tests/latest/apt_test.go'
12--- _integration-tests/tests/latest/apt_test.go 1970-01-01 00:00:00 +0000
13+++ _integration-tests/tests/latest/apt_test.go 2015-07-17 00:03:46 +0000
14@@ -0,0 +1,39 @@
15+// -*- Mode: Go; indent-tabs-mode: t -*-
16+
17+/*
18+ * Copyright (C) 2015 Canonical Ltd
19+ *
20+ * This program is free software: you can redistribute it and/or modify
21+ * it under the terms of the GNU General Public License version 3 as
22+ * published by the Free Software Foundation.
23+ *
24+ * This program is distributed in the hope that it will be useful,
25+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
26+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27+ * GNU General Public License for more details.
28+ *
29+ * You should have received a copy of the GNU General Public License
30+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
31+ *
32+ */
33+
34+package latest
35+
36+import (
37+ . "../common"
38+
39+ check "gopkg.in/check.v1"
40+)
41+
42+var _ = check.Suite(&aptSuite{})
43+
44+type aptSuite struct {
45+ SnappySuite
46+}
47+
48+func (s *aptSuite) TestAptGetMustPrintError(c *check.C) {
49+ aptOutput := ExecCommand(c, "apt-get", "update")
50+
51+ expected := "Ubuntu Core does not use apt-get, see 'snappy --help'!\n"
52+ c.Assert(aptOutput, check.Equals, expected)
53+}

Subscribers

People subscribed via source and target branches