Skip to content

Conversation

@Ninja243
Copy link
Contributor

Adds tests for the SAML package

@github-actions
Copy link

Code Coverage Report

Total Coverage: 26.4%

Details
otc-auth/accesstoken/accesstoken.go:20:		CreateAccessToken				0.0%
otc-auth/accesstoken/accesstoken.go:37:		makeAccessFile					0.0%
otc-auth/accesstoken/accesstoken.go:78:		CreateTemporaryAccessToken			0.0%
otc-auth/accesstoken/accesstoken.go:89:		ListAccessToken					0.0%
otc-auth/accesstoken/accesstoken.go:105:	getTempAccessTokenFromServiceProvider		0.0%
otc-auth/accesstoken/accesstoken.go:121:	getAccessTokenFromServiceProvider		0.0%
otc-auth/accesstoken/accesstoken.go:145:	handlePotentialLimitError			0.0%
otc-auth/accesstoken/accesstoken.go:168:	conditionallyReplaceAccessTokens		0.0%
otc-auth/accesstoken/accesstoken.go:192:	DeleteAccessToken				0.0%
otc-auth/accesstoken/accesstoken.go:200:	getIdentityServiceClient			0.0%
otc-auth/cce/cce.go:27:				GetClusterNames					0.0%
otc-auth/cce/cce.go:50:				GetKubeConfig					0.0%
otc-auth/cce/cce.go:90:				CheckAndWarnCertsValidity			0.0%
otc-auth/cce/cce.go:124:			getAuthInfoCerts				0.0%
otc-auth/cce/cce.go:148:			getClusterCerts					0.0%
otc-auth/cce/cce.go:176:			sprintCertInfo					0.0%
otc-auth/cce/cce.go:184:			getClustersForProjectFromServiceProvider	0.0%
otc-auth/cce/cce.go:209:			getKubeConfFromServiceProvider			0.0%
otc-auth/cce/cce.go:295:			getClusterID					0.0%
otc-auth/cce/cce.go:319:			getRefreshedClusterArr				0.0%
otc-auth/cce/kube_config.go:19:			getKubeConfig					0.0%
otc-auth/cce/kube_config.go:30:			mergeKubeConfig					0.0%
otc-auth/cce/kube_config.go:45:			merge						100.0%
otc-auth/cce/kube_config.go:50:			determineTargetLocation				0.0%
otc-auth/cce/kube_config.go:62:			renameKubeconfigEntries				0.0%
otc-auth/cmd/cmd_config.go:16:			initializeConfig				0.0%
otc-auth/cmd/cmd_config.go:35:			configureCmdFlagsAgainstEnvs			0.0%
otc-auth/cmd/completion.go:89:			init						0.0%
otc-auth/cmd/documentation.go:43:		init						0.0%
otc-auth/cmd/root.go:380:			Execute						0.0%
otc-auth/cmd/root.go:391:			setupRootCmd					0.0%
otc-auth/cmd/version.go:9:			SetVersionInfo					0.0%
otc-auth/common/endpoints/endpoints.go:15:	BaseURLIam					0.0%
otc-auth/common/endpoints/endpoints.go:27:	IdentityProviders				0.0%
otc-auth/common/functions.go:14:		RemoveFromSliceAtIndex				0.0%
otc-auth/common/functions.go:19:		WriteStringToFile				0.0%
otc-auth/common/functions.go:34:		ByteSliceToIndentedJSONFormat			0.0%
otc-auth/common/functions.go:43:		DeserializeJSONForType				80.0%
otc-auth/common/functions.go:53:		ThrowError					0.0%
otc-auth/common/http_client.go:20:		NewHTTPClient					0.0%
otc-auth/common/http_client.go:33:		MakeRequest					0.0%
otc-auth/common/http_client.go:38:		NewRequest					0.0%
otc-auth/common/http_client.go:49:		GetBodyBytesFromResponse			72.7%
otc-auth/common/otc_auth_helper.go:15:		GetCloudCredentialsFromResponse			55.0%
otc-auth/common/otc_auth_helper.go:50:		ParseTime					100.0%
otc-auth/config/config.go:21:			SetCustomConfigFilePath				0.0%
otc-auth/config/config.go:25:			effectiveConfigPath				0.0%
otc-auth/config/config.go:40:			LoadCloudConfig					0.0%
otc-auth/config/config.go:60:			registerNewCloud				0.0%
otc-auth/config/config.go:83:			IsAuthenticationValid				0.0%
otc-auth/config/config.go:111:			RemoveCloudConfig				0.0%
otc-auth/config/config.go:129:			UpdateClusters					0.0%
otc-auth/config/config.go:145:			UpdateProjects					0.0%
otc-auth/config/config.go:161:			UpdateCloudConfig				0.0%
otc-auth/config/config.go:178:			GetActiveCloudConfig				0.0%
otc-auth/config/config.go:194:			OtcConfigFileExists				0.0%
otc-auth/config/config.go:207:			getOtcConfig					0.0%
otc-auth/config/config.go:233:			createConfigFileWithCloudConfig			0.0%
otc-auth/config/config.go:241:			writeOtcConfigContentToFile			0.0%
otc-auth/config/config.go:254:			readFileContent					0.0%
otc-auth/config/config.go:283:			WriteConfigFile					0.0%
otc-auth/config/config.go:301:			removeCloudConfig				0.0%
otc-auth/config/model.go:20:			ContainsCloud					100.0%
otc-auth/config/model.go:29:			RemoveCloudByNameIfExists			100.0%
otc-auth/config/model.go:37:			SetActiveByName					100.0%
otc-auth/config/model.go:47:			FindActiveCloudConfigOrNil			100.0%
otc-auth/config/model.go:61:			GetActiveCloudIndex				100.0%
otc-auth/config/model.go:70:			NumberOfActiveCloudConfigs			100.0%
otc-auth/config/model.go:96:			FindProjectByName				100.0%
otc-auth/config/model.go:105:			GetProjectByName				100.0%
otc-auth/config/model.go:115:			FindProjectIndexByName				100.0%
otc-auth/config/model.go:124:			GetProjectNames					100.0%
otc-auth/config/model.go:137:			GetClusterNames					100.0%
otc-auth/config/model.go:145:			GetClusterByName				100.0%
otc-auth/config/model.go:154:			FindClusterByName				100.0%
otc-auth/config/model.go:163:			ContainsClusterByName				100.0%
otc-auth/config/model.go:178:			IsTokenValid					100.0%
otc-auth/config/model.go:187:			UpdateToken					100.0%
otc-auth/iam/iam.go:18:				AuthenticateAndGetUnscopedToken			0.0%
otc-auth/iam/iam.go:54:				GetScopedToken					0.0%
otc-auth/iam/iam.go:88:				getCloudWithScopedTokenFromServiceProvider	0.0%
otc-auth/iam/projects.go:17:			GetProjectsInActiveCloud			0.0%
otc-auth/iam/projects.go:32:			CreateScopedTokenForEveryProject		0.0%
otc-auth/iam/projects.go:38:			getProjectsFromServiceProvider			0.0%
otc-auth/login/login.go:17:			AuthenticateAndGetUnscopedToken			0.0%
otc-auth/login/login.go:71:			createScopedTokenForEveryProject		0.0%
otc-auth/login/login.go:76:			updateOTCInfoFile				0.0%
otc-auth/main.go:31:				main						0.0%
otc-auth/oidc/oidc.go:22:			newAuthService					0.0%
otc-auth/oidc/oidc.go:30:			authenticate					100.0%
otc-auth/oidc/oidc.go:50:			AuthenticateAndGetUnscopedToken			0.0%
otc-auth/oidc/oidc.go:57:			authenticateWithServiceProvider			94.1%
otc-auth/oidc/server.go:62:			newFlowController				0.0%
otc-auth/oidc/server.go:73:			Verify						0.0%
otc-auth/oidc/server.go:77:			Authenticate					100.0%
otc-auth/oidc/server.go:119:			handleRoot					100.0%
otc-auth/oidc/server.go:137:			createAndBindListener				0.0%
otc-auth/oidc/server.go:146:			startAndListenHTTPServer			83.3%
otc-auth/oidc/server.go:161:			registerHandlers				66.7%
otc-auth/oidc/server.go:168:			handleOIDCAuth					88.9%
otc-auth/oidc/server.go:216:			newHTTPServer					100.0%
otc-auth/oidc/server.go:228:			authenticateWithIdp				0.0%
otc-auth/oidc/service_account.go:15:		createServiceAccountAuthenticateRequest		88.9%
otc-auth/oidc/service_account.go:42:		authenticateServiceAccountWithIdp		87.0%
otc-auth/openstack/openstack.go:18:		WriteOpenStackCloudsYaml			88.9%
otc-auth/openstack/openstack.go:33:		createOpenstackCloudConfig			100.0%
otc-auth/openstack/openstack.go:54:		createOpenstackCloudsYAML			66.7%
otc-auth/saml/parser.go:15:			NewDefaultCredentialParser			0.0%
otc-auth/saml/parser.go:19:			Parse						0.0%
otc-auth/saml/saml.go:23:			newAuthenticator				0.0%
otc-auth/saml/saml.go:30:			AuthenticateAndGetUnscopedToken			0.0%
otc-auth/saml/saml.go:39:			Authenticate					89.5%
otc-auth/saml/saml.go:72:			getServiceProviderInitiatedRequest		100.0%
otc-auth/saml/saml.go:86:			authenticateWithIdp				100.0%
otc-auth/saml/saml.go:106:			validateAuthenticationWithServiceProvider	100.0%
total:						(statements)					26.4%

@krankkkk krankkkk self-requested a review October 23, 2025 09:48
@Ninja243 Ninja243 merged commit 1061bd4 into main Oct 23, 2025
5 checks passed
@Ninja243 Ninja243 deleted the Ninja243/testing/saml branch October 23, 2025 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants