Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/wifi-ap:fix-go-test into ~snappy-hwe-team/snappy-hwe-snaps/+git/wifi-ap:master

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Tony Espy
Approved revision: 7b8836d879ad1edd2863bdaa4e4bf1b927dee687
Merged at revision: 3d359674b4e0a6dda05bde2910fcb5420144ec1a
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/wifi-ap:fix-go-test
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/wifi-ap:master
Diff against target: 39 lines (+5/-2)
2 files modified
cmd/service/api_test.go (+1/-0)
snapcraft.yaml (+4/-2)
Reviewer Review Type Date Requested Status
Tony Espy Approve
System Enablement Bot continuous-integration Approve
Review via email: mp+359611@code.launchpad.net

Commit message

Re-enable go tests on snap build

Description of the change

Re-enable go tests on snap build

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :

PASSED: Successfully build documentation, rev: 7b8836d879ad1edd2863bdaa4e4bf1b927dee687

Generated documentation is available at https://jenkins.canonical.com/system-enablement/job/snappy-hwe-snaps-snap-docs/1131/

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tony Espy (awe) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/cmd/service/api_test.go b/cmd/service/api_test.go
2index 29ac81b..ef5f903 100644
3--- a/cmd/service/api_test.go
4+++ b/cmd/service/api_test.go
5@@ -235,6 +235,7 @@ func (s *S) TestInvalidToken(c *check.C) {
6
7 func (s *S) TestChangeConfiguration(c *check.C) {
8 os.Setenv("SNAP", "../..")
9+ os.Setenv("SNAP_DATA", "/tmp")
10
11 // Values to be used in the config
12 values := map[string]string{
13diff --git a/snapcraft.yaml b/snapcraft.yaml
14index 93880ac..f01dd84 100644
15--- a/snapcraft.yaml
16+++ b/snapcraft.yaml
17@@ -76,18 +76,20 @@ parts:
18 service:
19 after: [go]
20 plugin: make
21- build: |
22+ override-build: |
23 set -ex
24 export GOPATH=$(mktemp -d)
25 (src_path="$GOPATH"/src/launchpad.net/wifi-ap
26 mkdir -p "$src_path"
27- cp -a cmd "$src_path"
28+ cp -a cmd/ "$src_path"
29+ cp -a conf/ "$src_path"
30 cd "$src_path"
31 go get -t -d ...
32 mkdir -p $SNAPCRAFT_PART_INSTALL/bin/
33 for d in client service ; do
34 cd $GOPATH/src/launchpad.net/wifi-ap/cmd/"$d"
35 go build
36+ go test -v
37 cp -f "$d" $SNAPCRAFT_PART_INSTALL/bin/
38 done)
39 rm -rf "$GOPATH"

Subscribers

People subscribed via source and target branches