Skip to content

Commit

Permalink
build: Update go to latest 1.22.5 (#6)
Browse files Browse the repository at this point in the history
* build: Update go to latest 1.22.5
  • Loading branch information
jdogmcsteezy committed Jul 17, 2024
1 parent b70fb94 commit 3094c99
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 55 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/create-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

# push:
# branches:
# - "actions-hub" # remove before merge into main
# - "update-go"
jobs:
build-and-release:
runs-on: macos-13
Expand All @@ -40,10 +40,13 @@ jobs:
/usr/local/bin/brew install python-tk@3.11 || echo "I1.5"
for i in dpkg upx zip make wget jq rpm python3.11; do command -v $i || exit 1; done
echo "Dependencies checked"
- name: "Install golang"
- name: Get go version from go.mod
run: |
wget https://go.dev/dl/go1.22.2.darwin-amd64.pkg
sudo installer -store -pkg go1.22.2.darwin-amd64.pkg -target /
echo "GO_VERSION=$(grep '^go ' go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: "Install Packages.pkg for making macos PKG files"
run: |
wget http://s.sudre.free.fr/Software/files/Packages.dmg
Expand Down
101 changes: 51 additions & 50 deletions e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package main

import (
"asvec/cmd/flags"
"asvec/tests"
"context"
"crypto/tls"
Expand Down Expand Up @@ -84,63 +85,63 @@ func TestCmdSuite(t *testing.T) {
logger.Error("Failed to read cert")
}

// certificates, err := GetCertificates("docker/mtls/config/tls/localhost.crt", "docker/mtls/config/tls/localhost.key")
// if err != nil {
// t.Fatalf("unable to read certificates %v", err)
// t.FailNow()
// logger.Error("Failed to read cert")
// }
certificates, err := GetCertificates("docker/mtls/config/tls/localhost.crt", "docker/mtls/config/tls/localhost.key")
if err != nil {
t.Fatalf("unable to read certificates %v", err)
t.FailNow()
logger.Error("Failed to read cert")
}

logger.Info("%v", slog.Any("cert", rootCA))
suite.Run(t, &CmdTestSuite{
composeFile: "docker/vanilla/docker-compose.yml", // vanilla
suiteFlags: []string{"--log-level debug", "--timeout 10s"},
avsIP: "localhost",
})
// suite.Run(t, &CmdTestSuite{
// composeFile: "docker/tls/docker-compose.yml", // tls
// suiteFlags: []string{
// "--log-level debug",
// "--timeout 10s",
// tests.CreateFlagStr(flags.TLSCaFile, "docker/tls/config/tls/ca.aerospike.com.crt"),
// },
// avsTLSConfig: &tls.Config{
// Certificates: nil,
// RootCAs: rootCA,
// },
// avsIP: "localhost",
// })
// suite.Run(t, &CmdTestSuite{
// composeFile: "docker/mtls/docker-compose.yml", // mutual tls
// suiteFlags: []string{
// "--log-level debug",
// "--timeout 10s",
// tests.CreateFlagStr(flags.TLSCaFile, "docker/mtls/config/tls/ca.aerospike.com.crt"),
// tests.CreateFlagStr(flags.TLSCertFile, "docker/mtls/config/tls/localhost.crt"),
// tests.CreateFlagStr(flags.TLSKeyFile, "docker/mtls/config/tls/localhost.key"),
// },
// avsTLSConfig: &tls.Config{
// Certificates: certificates,
// RootCAs: rootCA,
// },
// avsIP: "localhost",
// })
// suite.Run(t, &CmdTestSuite{
// composeFile: "docker/auth/docker-compose.yml", // tls + auth (auth requires tls)
// suiteFlags: []string{
// "--log-level debug",
// "--timeout 10s",
// tests.CreateFlagStr(flags.TLSCaFile, "docker/auth/config/tls/ca.aerospike.com.crt"),
// tests.CreateFlagStr(flags.AuthUser, "admin"),
// tests.CreateFlagStr(flags.AuthPassword, "admin"),
// },
// avsCreds: avs.NewCredntialsFromUserPass("admin", "admin"),
// avsTLSConfig: &tls.Config{
// Certificates: nil,
// RootCAs: rootCA,
// },
// avsIP: "localhost",
// })
suite.Run(t, &CmdTestSuite{
composeFile: "docker/tls/docker-compose.yml", // tls
suiteFlags: []string{
"--log-level debug",
"--timeout 10s",
tests.CreateFlagStr(flags.TLSCaFile, "docker/tls/config/tls/ca.aerospike.com.crt"),
},
avsTLSConfig: &tls.Config{
Certificates: nil,
RootCAs: rootCA,
},
avsIP: "localhost",
})
suite.Run(t, &CmdTestSuite{
composeFile: "docker/mtls/docker-compose.yml", // mutual tls
suiteFlags: []string{
"--log-level debug",
"--timeout 10s",
tests.CreateFlagStr(flags.TLSCaFile, "docker/mtls/config/tls/ca.aerospike.com.crt"),
tests.CreateFlagStr(flags.TLSCertFile, "docker/mtls/config/tls/localhost.crt"),
tests.CreateFlagStr(flags.TLSKeyFile, "docker/mtls/config/tls/localhost.key"),
},
avsTLSConfig: &tls.Config{
Certificates: certificates,
RootCAs: rootCA,
},
avsIP: "localhost",
})
suite.Run(t, &CmdTestSuite{
composeFile: "docker/auth/docker-compose.yml", // tls + auth (auth requires tls)
suiteFlags: []string{
"--log-level debug",
"--timeout 10s",
tests.CreateFlagStr(flags.TLSCaFile, "docker/auth/config/tls/ca.aerospike.com.crt"),
tests.CreateFlagStr(flags.AuthUser, "admin"),
tests.CreateFlagStr(flags.AuthPassword, "admin"),
},
avsCreds: avs.NewCredntialsFromUserPass("admin", "admin"),
avsTLSConfig: &tls.Config{
Certificates: nil,
RootCAs: rootCA,
},
avsIP: "localhost",
})
}

func (suite *CmdTestSuite) SetupSuite() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module asvec

go 1.21.7
go 1.22.5

require (
github.com/aerospike/avs-client-go v0.0.0-20240715163208-0e4de7f46838
Expand Down

0 comments on commit 3094c99

Please sign in to comment.