Skip to content

Commit 228f3c5

Browse files
committed
chore(tests): OAuth unit tests don't need to pull from env
Signed-off-by: Hayden Roszell <hroszell@gmail.com>
1 parent 52ed369 commit 228f3c5

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
with:
5757
deploy-k8s: 'true'
5858
deploy-nginx-ingress: 'true'
59+
deploy-signserver: 'false'
5960

6061
# Run Go tests
6162
- name: Run go test

backend_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ import (
2828
var (
2929
clientCert = ""
3030
clientKey = ""
31-
tokenURL = os.Getenv("EJBCA_OAUTH_TOKEN_URL")
32-
clientID = os.Getenv("EJBCA_OAUTH_CLIENT_ID")
33-
clientSecret = os.Getenv("EJBCA_OAUTH_CLIENT_SECRET")
34-
scopes = os.Getenv("EJBCA_OAUTH_SCOPES")
35-
audience = os.Getenv("EJBCA_OAUTH_AUDIENCE")
3631
caCert = ""
3732
hostname = os.Getenv("EJBCA_HOSTNAME")
3833
_defaultCaName = os.Getenv("EJBCA_CA_NAME")

path_config_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ func TestConfig(t *testing.T) {
8787
})
8888

8989
t.Run("Test Configuration OAuth", func(t *testing.T) {
90+
const (
91+
tokenURL = "https://dev.idp.com/oauth/token"
92+
clientID = "fi3ElQUVoBBHyRNt4mpUxG9WY65AOCcJ"
93+
clientSecret = "UenqbXbqPPlmfettbsu7erbqzrvwomrnvuR"
94+
scopes = "read:certificates,write:certificates"
95+
audience = "https://ejbca.example.com"
96+
)
97+
9098
err := testConfigCreate(t, b, reqStorage, map[string]interface{}{
9199
"token_url": tokenURL,
92100
"client_id": clientID,

0 commit comments

Comments
 (0)