Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,24 +82,13 @@ tasks:
- cmd: |
if [ "$GITHUB_WORKFLOW" = "ci" ]; then
echo "Running tests in Github Actions"
echo "127.0.0.1 portal.dev.local kcp.api.portal.dev.local" | sudo tee -a /etc/hosts
PATH=$(pwd)/{{.LOCAL_BIN}}:$PATH go test -timeout 10m -coverprofile=cover.out ./... {{.ADDITIONAL_COMMAND_ARGS}} || {
echo "---Listing HelmReleases"
kubectl get helmreleases -A
# ...
exit 1
}
else
# test if portal.dev.local and kcp.api.portal.dev.local are in /etc/hosts
if ! grep -q "portal.dev.local" /etc/hosts; then
echo "Missing portal.dev.local in /etc/hosts"
exit 1
fi
if ! grep -q "kcp.api.portal.dev.local" /etc/hosts;
then
echo "Missing kcp.api.portal.dev.local in /etc/hosts"
exit 1
fi
export PATH=$(pwd)/{{.LOCAL_BIN}}:$PATH
go test -timeout 10m -coverprofile=cover.out ./... {{.ADDITIONAL_COMMAND_ARGS}}
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ spec:
"data": {
"nodes": [
{
"pathSegment": "core_namespaces",
"navigationContext": "core_namespaces",
"pathSegment": "namespaces",
"navigationContext": "namespaces",
"label": "Namespaces",
"entityType": "main.core_platform-mesh_io_account",
"icon": "group-2",
Expand All @@ -36,7 +36,7 @@ spec:
},
"context": {
"resourceDefinition": {
"group": "core",
"group": "",
"plural": "namespaces",
"singular": "namespace",
"kind": "Namespace",
Expand Down
4 changes: 2 additions & 2 deletions pkg/subroutines/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (s *DeployTestSuite) Test_applyReleaseWithValues() {
specJSON, ok := specValues.(apiextensionsv1.JSON)
s.Require().True(ok, "spec.values should be of type apiextensionsv1.JSON")

expected := `{"baseDomain":"portal.dev.local","baseDomainPort":"portal.dev.local:8443","iamWebhookCA":"","port":"8443","protocol":"https","services":{"services":{"platform-mesh-operator":{"version":"v1.0.0"}}}}`
expected := `{"baseDomain":"portal.localhost","baseDomainPort":"portal.localhost:8443","iamWebhookCA":"","port":"8443","protocol":"https","services":{"services":{"platform-mesh-operator":{"version":"v1.0.0"}}}}`
s.Require().Equal(expected, string(specJSON.Raw), "spec.values.Raw should match expected JSON string")

return nil
Expand Down Expand Up @@ -140,7 +140,7 @@ func (s *DeployTestSuite) Test_applyReleaseWithValues() {
specJSON, ok := specValues.(apiextensionsv1.JSON)
s.Require().True(ok, "spec.values should be of type apiextensionsv1.JSON")

expected := `{"baseDomain":"portal.dev.local","baseDomainPort":"portal.dev.local","iamWebhookCA":"","port":"443","protocol":"https","services":{"services":{"platform-mesh-operator":{"version":"v1.0.0"}}}}`
expected := `{"baseDomain":"portal.localhost","baseDomainPort":"portal.localhost","iamWebhookCA":"","port":"443","protocol":"https","services":{"services":{"platform-mesh-operator":{"version":"v1.0.0"}}}}`
s.Require().Equal(expected, string(specJSON.Raw), "spec.values.Raw should match expected JSON string")

return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/subroutines/subroutine_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ func MergeValuesAndInfraValues(inst *v1alpha1.PlatformMesh, templateVars apiexte

func baseDomainPortProtocol(inst *v1alpha1.PlatformMesh) (string, string, int, string) {
port := 8443
baseDomain := "portal.dev.local"
baseDomain := "portal.localhost"
protocol := "https"
baseDomainPort := ""

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/kind/kustomize/components/ocm/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ spec:
namespace: default
repositoryRef:
name: platform-mesh
semver: 0.1.0
semver: 0.2.0-build.522
8 changes: 2 additions & 6 deletions test/e2e/kind/suite_kind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (s *KindTestSuite) createCerts() ([]byte, error) {
// mkcert
_, err := runCommand("mkdir", "-p", "certs")
s.Require().NoError(err, "Error creating certs directory")
if _, err = runCommand("../../../bin/mkcert", "-cert-file=certs/cert.crt", "-key-file=certs/cert.key", "*.dev.local", "*.portal.dev.local"); err != nil {
if _, err = runCommand("../../../bin/mkcert", "-cert-file=certs/cert.crt", "-key-file=certs/cert.key", "portal.localhost", "*.portal.localhost", "localhost"); err != nil {
return nil, err
}
dirRootPath, err := runCommand("../../../bin/mkcert", "-CAROOT")
Expand Down Expand Up @@ -364,10 +364,6 @@ func (s *KindTestSuite) createReleases(ctx context.Context) error {

s.logger.Info().Msg("helm resources ready")

if err := ApplyManifestFromFile(ctx, "../../../test/e2e/kind/yaml/virtual-workspaces/vws-cert.yaml", s.client, make(map[string]string)); err != nil {
return err
}

time.Sleep(25 * time.Second)
return nil
}
Expand Down Expand Up @@ -537,7 +533,7 @@ func (s *KindTestSuite) runOperator(ctx context.Context) {
appConfig.Subroutines.ProviderSecret.Enabled = true
appConfig.Subroutines.FeatureToggles.Enabled = true
appConfig.WorkspaceDir = "../../../"
appConfig.KCP.Url = "https://kcp.api.portal.dev.local:8443"
appConfig.KCP.Url = "https://localhost:8443"
appConfig.KCP.RootShardName = "root"
appConfig.KCP.Namespace = "platform-mesh-system"
appConfig.KCP.FrontProxyName = "frontproxy"
Expand Down
16 changes: 8 additions & 8 deletions test/e2e/kind/yaml/platform-mesh-resource/platform-mesh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ spec:
- "http://localhost:4300"
- "http://*.localhost:4200"
- "http://*.localhost:4300"
- "https://portal.dev.local:8443"
- "https://*.portal.dev.local:8443"
- "https://portal.localhost:8443"
- "https://*.portal.localhost:8443"
gatewayApi:
enabled: true
mailpit:
Expand All @@ -58,7 +58,7 @@ spec:
rootShard:
extraArgs:
- --feature-gates=WorkspaceAuthentication=true
- --shard-virtual-workspace-url=https://kcp.api.portal.dev.local:6443
- --shard-virtual-workspace-url=https://localhost:8443
webhook:
enabled: true
frontProxy:
Expand All @@ -82,14 +82,14 @@ spec:
component: infra
security-operator:
values:
baseDomain: "portal.dev.local:8443"
baseDomain: "portal.localhost:8443"
initializer:
extraArgs:
- --idp-smtp-server=mailpit.platform-mesh-system.svc.cluster.local
- --idp-smtp-port=1025
- --idp-from-address=keycloak@portal.dev.local
- --idp-from-address=keycloak@portal.localhost
- --domain-ca-lookup
- --idp-additional-redirect-urls="https://default.portal.dev.local:3000/callback*"
- --idp-additional-redirect-urls="https://default.portal.localhost:3000/callback*"
caSecret: domain-certificate-ca
hostAliases:
enabled: true
Expand All @@ -105,9 +105,9 @@ spec:
kind: Gateway
extraEnvVars:
- name: OPENMFP_PORTAL_CONTEXT_IAM_SERVICE_API_URL
value: https://${org-subdomain}portal.dev.local:8443/iam/graphql
value: https://${org-subdomain}portal.localhost:8443/iam/graphql
- name: OPENMFP_PORTAL_CONTEXT_CRD_GATEWAY_API_URL
value: "https://${org-subdomain}portal.dev.local:8443/api/kubernetes-graphql-gateway/root:orgs:${org-name}/graphql"
value: "https://${org-subdomain}portal.localhost:8443/api/kubernetes-graphql-gateway/root:orgs:${org-name}/graphql"
- name: NODE_EXTRA_CA_CERTS
value: /etc/ssl/certs/domain-ca.crt
extraVolumes:
Expand Down
27 changes: 0 additions & 27 deletions test/e2e/kind/yaml/virtual-workspaces/vws-cert.yaml

This file was deleted.

Loading