Skip to content

Commit

Permalink
update test.yml, var name, and mongo connection testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiangs18 committed Mar 13, 2024
1 parent 95e7f5c commit d2b48b7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ jobs:
mongo: 'mongodb-linux-x86_64-3.6.12'
minio: '2019-05-23T00-29-34Z'
wired_tiger: 'false'
- go: '1.12'
mongo: 'mongodb-linux-x86_64-3.6.20'
minio: '2019-05-23T00-29-34Z'
wired_tiger: 'true'
- go: '1.12'
mongo: 'mongodb-linux-x86_64-ubuntu2204-7.0.4'
minio: '2019-05-23T00-29-34Z'
wired_tiger: 'false'
- go: '1.12'
mongo: 'mongodb-linux-x86_64-ubuntu2204-7.0.4'
minio: '2019-05-23T00-29-34Z'
Expand Down
11 changes: 0 additions & 11 deletions test/kbaseauthcontroller/authjars.go

This file was deleted.

5 changes: 5 additions & 0 deletions test/kbaseauthcontroller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ import (
"github.com/phayes/freeport"
)

// The following are required to run the KBase auth server in test mode.
const (
serverClass = "us.kbase.test.auth2.StandaloneAuthServer"
// authTemplates is the zip file containing templates for the server
authTemplates = "kbase/auth2/kbase-auth2templates-0.2.4.zip"
// auth2ShadowAllJar is the jar required for the server
authShadowAllJar = "kbase/auth2/kbase-auth2-test-shadow-all-0.7.0.jar"
)

// Params are Parameters for creating a KBase Auth2 service (https://github.com/kbase/auth2)
Expand Down
10 changes: 8 additions & 2 deletions test/mongocontroller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ func New(p Params) (*Controller, error) {
if err != nil {
return nil, err
}

// test mongo connection
res := client.Database("foo").RunCommand(context.TODO(), map[string]int{"buildinfo": 1})
if res.Err() != nil {
return nil, res.Err()
}
// wired tiger will also not include index names for 3.0, but we're not going to test
// that so screw it
return &Controller{port, tdir, cmd, ver.LessThan(*semver.New("3.2.1000"))}, nil
Expand Down Expand Up @@ -128,8 +134,8 @@ func (c *Controller) Destroy(deleteTempDir bool) error {
return nil
}

func getMongoDBVer(ExecutablePath string) (*semver.Version, error) {
cmd := exec.Command(ExecutablePath, "--version")
func getMongoDBVer(executablePath string) (*semver.Version, error) {
cmd := exec.Command(executablePath, "--version")
stdout, err := cmd.Output()
if err != nil {
return nil, err
Expand Down

0 comments on commit d2b48b7

Please sign in to comment.