mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-12 08:37:38 +02:00
integration: remove identity-provider-specific integration tests (#3636)
This commit is contained in:
parent
de804edc19
commit
55312ef330
95 changed files with 18 additions and 43640 deletions
2
.github/workflows/benchmark.yaml
vendored
2
.github/workflows/benchmark.yaml
vendored
|
@ -52,7 +52,7 @@ jobs:
|
||||||
- name: start cluster
|
- name: start cluster
|
||||||
run: |
|
run: |
|
||||||
export POMERIUM_TAG=dev
|
export POMERIUM_TAG=dev
|
||||||
cd ./integration/clusters/google-single
|
cd ./integration/clusters/single
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
|
||||||
- name: integration tests
|
- name: integration tests
|
||||||
|
|
5
.github/workflows/test.yaml
vendored
5
.github/workflows/test.yaml
vendored
|
@ -117,7 +117,6 @@ jobs:
|
||||||
node-version: [16.x]
|
node-version: [16.x]
|
||||||
platform: [ubuntu-latest]
|
platform: [ubuntu-latest]
|
||||||
deployment: [kubernetes, multi, nginx, single, traefik]
|
deployment: [kubernetes, multi, nginx, single, traefik]
|
||||||
idp: [auth0, azure, github, gitlab, google, oidc, okta, onelogin, ping]
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f
|
- uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f
|
||||||
|
@ -150,12 +149,12 @@ jobs:
|
||||||
- name: start cluster
|
- name: start cluster
|
||||||
run: |
|
run: |
|
||||||
export POMERIUM_TAG=dev
|
export POMERIUM_TAG=dev
|
||||||
cd ./integration/clusters/${{matrix.idp}}-${{matrix.deployment}}
|
cd ./integration/clusters/${{matrix.deployment}}
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
|
||||||
- name: integration tests
|
- name: integration tests
|
||||||
run: |
|
run: |
|
||||||
(cd ./integration/clusters/${{matrix.idp}}-${{matrix.deployment}} && docker-compose logs -f &)
|
(cd ./integration/clusters/${{matrix.deployment}} && docker-compose logs -f &)
|
||||||
go test -v ./integration/...
|
go test -v ./integration/...
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -406,6 +406,7 @@ services:
|
||||||
- forward-authenticate.localhost.pomerium.io
|
- forward-authenticate.localhost.pomerium.io
|
||||||
pomerium-ready:
|
pomerium-ready:
|
||||||
command:
|
command:
|
||||||
|
- -skip-tls-verify
|
||||||
- -wait
|
- -wait
|
||||||
- http://pomerium:80/healthz
|
- http://pomerium:80/healthz
|
||||||
- -timeout
|
- -timeout
|
||||||
|
@ -433,7 +434,7 @@ services:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
wrongly-named-httpdetails-ready:
|
wrongly-named-httpdetails-ready:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
image: jwilder/dockerize:0.6.1
|
image: powerman/dockerize:0.16.3
|
||||||
networks:
|
networks:
|
||||||
main:
|
main:
|
||||||
aliases:
|
aliases:
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -182,6 +182,7 @@ services:
|
||||||
- forward-authenticate.localhost.pomerium.io
|
- forward-authenticate.localhost.pomerium.io
|
||||||
pomerium-ready:
|
pomerium-ready:
|
||||||
command:
|
command:
|
||||||
|
- -skip-tls-verify
|
||||||
- -wait
|
- -wait
|
||||||
- https://pomerium:443/healthz
|
- https://pomerium:443/healthz
|
||||||
- -timeout
|
- -timeout
|
||||||
|
@ -209,7 +210,7 @@ services:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
wrongly-named-httpdetails-ready:
|
wrongly-named-httpdetails-ready:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
image: jwilder/dockerize:0.6.1
|
image: powerman/dockerize:0.16.3
|
||||||
networks:
|
networks:
|
||||||
main:
|
main:
|
||||||
aliases:
|
aliases:
|
|
@ -103,22 +103,23 @@ func Authenticate(ctx context.Context, client *http.Client, url *url.URL, option
|
||||||
|
|
||||||
apiLogin.Path = cfg.apiPath
|
apiLogin.Path = cfg.apiPath
|
||||||
req, err := http.NewRequestWithContext(ctx, "GET", apiLogin.String(), nil)
|
req, err := http.NewRequestWithContext(ctx, "GET", apiLogin.String(), nil)
|
||||||
req.Header.Set("Accept", "application/json")
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, fmt.Errorf("via-api: invalid request: %w", err)
|
||||||
}
|
}
|
||||||
|
req.Header.Set("Accept", "application/json")
|
||||||
|
|
||||||
res, err := client.Do(req)
|
res, err := client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, fmt.Errorf("via-api: error making request: %w", err)
|
||||||
}
|
}
|
||||||
defer res.Body.Close()
|
defer res.Body.Close()
|
||||||
bodyBytes, err := io.ReadAll(res.Body)
|
bodyBytes, err := io.ReadAll(res.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, fmt.Errorf("via-api: error reading response body: %w", err)
|
||||||
}
|
}
|
||||||
url, err = url.Parse(string(bodyBytes))
|
url, err = url.Parse(string(bodyBytes))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, fmt.Errorf("via-api: error parsing response body: %w", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -152,10 +152,9 @@ func setIDPAndClusterType(ctx context.Context) {
|
||||||
}
|
}
|
||||||
for _, container := range containers {
|
for _, container := range containers {
|
||||||
for _, name := range container.Names {
|
for _, name := range container.Names {
|
||||||
parts := regexp.MustCompile(`^/(\w+?)-(\w+?)_pomerium.*$`).FindStringSubmatch(name)
|
parts := regexp.MustCompile(`^/(\w+?)[-_]pomerium.*$`).FindStringSubmatch(name)
|
||||||
if len(parts) == 3 {
|
if len(parts) == 2 {
|
||||||
IDP = parts[1]
|
ClusterType = parts[1]
|
||||||
ClusterType = parts[2]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,8 +192,9 @@ function(mode, idp, dns_suffix='') {
|
||||||
environment: environment,
|
environment: environment,
|
||||||
}, ['authenticate.localhost.pomerium.io', 'forward-authenticate.localhost.pomerium.io']) +
|
}, ['authenticate.localhost.pomerium.io', 'forward-authenticate.localhost.pomerium.io']) +
|
||||||
ComposeService(name + '-ready', {
|
ComposeService(name + '-ready', {
|
||||||
image: 'jwilder/dockerize:0.6.1',
|
image: 'powerman/dockerize:0.16.3',
|
||||||
command: [
|
command: [
|
||||||
|
'-skip-tls-verify',
|
||||||
'-wait',
|
'-wait',
|
||||||
if mode == 'nginx' then
|
if mode == 'nginx' then
|
||||||
'http://' + name + ':80/healthz'
|
'http://' + name + ':80/healthz'
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/kubernetes.libsonnet')('auth0')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/multi.libsonnet')('auth0')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/nginx.libsonnet')('auth0')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/single.libsonnet')('auth0')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/traefik.libsonnet')('auth0')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/kubernetes.libsonnet')('azure')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/multi.libsonnet')('azure')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/nginx.libsonnet')('azure')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/single.libsonnet')('azure')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/traefik.libsonnet')('azure')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/kubernetes.libsonnet')('github')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/multi.libsonnet')('github')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/nginx.libsonnet')('github')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/single.libsonnet')('github')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/traefik.libsonnet')('github')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/kubernetes.libsonnet')('gitlab')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/multi.libsonnet')('gitlab')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/nginx.libsonnet')('gitlab')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/single.libsonnet')('gitlab')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/traefik.libsonnet')('gitlab')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/kubernetes.libsonnet')('google')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/multi.libsonnet')('google')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/nginx.libsonnet')('google')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/single.libsonnet')('google')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/traefik.libsonnet')('google')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/kubernetes.libsonnet')('okta')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/multi.libsonnet')('okta')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/nginx.libsonnet')('okta')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/single.libsonnet')('okta')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/traefik.libsonnet')('okta')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/kubernetes.libsonnet')('onelogin')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/multi.libsonnet')('onelogin')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/nginx.libsonnet')('onelogin')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/single.libsonnet')('onelogin')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/traefik.libsonnet')('onelogin')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/kubernetes.libsonnet')('ping')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/multi.libsonnet')('ping')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/nginx.libsonnet')('ping')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/single.libsonnet')('ping')
|
|
|
@ -1 +0,0 @@
|
||||||
(import '../../deployments/traefik.libsonnet')('ping')
|
|
Loading…
Add table
Add a link
Reference in a new issue