Skip to content

Commit

Permalink
Fix integration tests config
Browse files Browse the repository at this point in the history
  • Loading branch information
gruyaume committed Feb 5, 2024
1 parent 6f75128 commit 2614454
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 16 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
- name: Run PLMN A
run: |
docker run \
-p 1231:1231 \
-p 1232:1232 \
-v ${{ github.workspace }}/e2etests/plmnA/config.yaml:/etc/sepp/config.yaml \
-v ${{ github.workspace }}/e2etests/plmnA/certs/:/etc/sepp/certs/ \
-d \
Expand All @@ -39,6 +41,8 @@ jobs:
- name: Run PLMN B
run: |
docker run \
-p 1233:1233 \
-p 1234:1234 \
-v ${{ github.workspace }}/e2etests/plmnB/config.yaml:/etc/sepp/config.yaml \
-v ${{ github.workspace }}/e2etests/plmnB/certs/:/etc/sepp/certs/ \
-d \
Expand Down
6 changes: 4 additions & 2 deletions e2etests/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package e2e_tests
import (
"crypto/tls"
"crypto/x509"
"fmt"
"net/http"
"os"
"testing"
)

var PLMNAFQDN = "https://127.0.0.1:1234"
var PLMNASBIFQDN = "https://127.0.0.1:1232"
var CertsPath = "client/certs/"

func TestEndToEnd(t *testing.T) {
Expand Down Expand Up @@ -36,7 +37,7 @@ func TestEndToEnd(t *testing.T) {
},
}

resp, err := client.Get(PLMNAFQDN)
resp, err := client.Get(PLMNASBIFQDN)
if err != nil {
t.Fatalf("Failed to make request: %v", err)
}
Expand All @@ -46,4 +47,5 @@ func TestEndToEnd(t *testing.T) {
t.Errorf("Unexpected status code: got %v want %v", resp.StatusCode, http.StatusOK)
}

fmt.Printf("HLLO")
}
10 changes: 5 additions & 5 deletions e2etests/plmnA/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ sepp:
securityCapability: "TLS"
local:
n32:
fqdn: "https://localhost:1233"
host: "localhost"
port: "1233"
fqdn: "https://0.0.0.0:1231"
host: "0.0.0.0"
port: "1231"
tls:
cert: "/etc/sepp/certs/n32Server.crt"
key: "/etc/sepp/certs/n32Server.key"
ca: "/etc/sepp/certs/ca.crt"
sbi:
fqdn: "local-sbi.example.com"
host: "localhost"
port: "1234"
host: "0.0.0.0"
port: "1232"
tls:
cert: "/etc/sepp/certs/sbiServer.crt"
key: "/etc/sepp/certs/sbiServer.key"
Expand Down
24 changes: 15 additions & 9 deletions e2etests/plmnB/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@ sepp:
securityCapability: "TLS"
local:
n32:
fqdn: "https://localhost:1233"
host: "localhost"
fqdn: "https://0.0.0.0:1233"
host: "0.0.0.0"
port: "1233"
tls:
cert: "e2etests/certs/n32Server.crt"
key: "e2etests/certs/n32Server.key"
ca: "e2etests/certs/ca.crt"
cert: "/etc/sepp/certs/n32Server.crt"
key: "/etc/sepp/certs/n32Server.key"
ca: "/etc/sepp/certs/ca.crt"
sbi:
fqdn: "local-sbi.example.com"
host: "localhost"
host: "0.0.0.0"
port: "1234"
tls:
cert: "e2etests/certs/sbiServer.crt"
key: "e2etests/certs/sbiServer.key"
ca: "e2etests/certs/ca.crt"
cert: "/etc/sepp/certs/sbiServer.crt"
key: "/etc/sepp/certs/sbiServer.key"
ca: "/etc/sepp/certs/ca.crt"
remote:
url: "https://0.0.0.0:1233"
tls:
cert: "/etc/sepp/certs/client.crt"
key: "/etc/sepp/certs/client.key"
ca: "/etc/sepp/certs/ca.crt"

0 comments on commit 2614454

Please sign in to comment.