Skip to content

Commit

Permalink
GH-249: Removed travis references.
Browse files Browse the repository at this point in the history
Updated TestVersionMatchesTag test to use GITHUB_REF environment variable.
  • Loading branch information
jirenius committed Jun 30, 2024
1 parent 889fb13 commit 8f8061e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 60 deletions.
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/res-service-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ MUST be a number.
HTTP headers to set on the HTTP response. MAY be omitted.
SHOULD be ignored if **isHttp** is not set to `true` on the request.
MUST be a key/value object, where the key is the canonical format of the MIME header, and the value is an array of strings associated with the key.
If the header key is `"Set-Cookie"`, the value will be addeded to any existing values, otherwise it will replace any existing value.
If the header key is `"Set-Cookie"`, the value will be added to any existing values, otherwise it will replace any existing value.

### Status codes
The status code is a subset of the HTTP status codes. Behavior is only defined for redirection (3XX), client error (4XX), and server error (5XX).
Expand Down
9 changes: 1 addition & 8 deletions scripts/cover.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@
# Run from directory above via ./scripts/cover.sh

go test -v -covermode=atomic -coverprofile=./cover.out -coverpkg=./server/... ./test

# If we have an arg, assume travis run and push to coveralls. Otherwise launch browser results
if [[ -n $1 ]]; then
$HOME/gopath/bin/goveralls -coverprofile=cover.out -service=travis-ci
rm -rf ./cover.out
else
go tool cover -html=cover.out
fi
go tool cover -html=cover.out
32 changes: 0 additions & 32 deletions scripts/cross_compile.sh

This file was deleted.

13 changes: 9 additions & 4 deletions server/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package server

import (
"os"
"strings"
"testing"
)

Expand Down Expand Up @@ -157,13 +158,17 @@ func TestNewServiceConfigError(t *testing.T) {
}
}

// Test that the travis version tag (if existing) matches that
// Test that the git version tag (if existing) matches that
// of the Version constant.
func TestVersionMatchesTag(t *testing.T) {
tag := os.Getenv("TRAVIS_TAG")
if tag == "" {
t.SkipNow()
ref := os.Getenv("GITHUB_REF")
if ref == "" {
t.Skip("no GITHUB_REF environment value")
}
if !strings.HasPrefix(ref, "refs/tags/") {
t.Skipf("GITHUB_REF environment value not starting with refs/tags/: %s", ref)
}
tag := ref[:len("refs/tags/")]
if tag[0] != 'v' {
t.Fatalf("Expected tag to start with `v`, got %+v", tag)
}
Expand Down

0 comments on commit 8f8061e

Please sign in to comment.