Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Unit test coverage must exceed a promotion gate of 85% #142

Open
tisnik opened this issue Feb 18, 2020 · 1 comment
Open

Unit test coverage must exceed a promotion gate of 85% #142

tisnik opened this issue Feb 18, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@tisnik
Copy link
Contributor

tisnik commented Feb 18, 2020

This is a requirement for onboard application to cloud.redhat.com

@tisnik tisnik self-assigned this May 26, 2020
@tisnik tisnik added the enhancement New feature or request label May 26, 2020
@tisnik
Copy link
Contributor Author

tisnik commented Jun 8, 2020

Current situation:

github.com/RedHatInsights/insights-operator-controller/controller.go:51:		initializeSplunk			100.0%
github.com/RedHatInsights/insights-operator-controller/controller.go:60:		readConfigurationFile			100.0%
github.com/RedHatInsights/insights-operator-controller/controller.go:79:		readConfiguration			100.0%
github.com/RedHatInsights/insights-operator-controller/controller.go:128:		main					0.0%
github.com/RedHatInsights/insights-operator-controller/logging/splunk.go:29:		NewClient				100.0%
github.com/RedHatInsights/insights-operator-controller/logging/splunk.go:39:		Log					100.0%
github.com/RedHatInsights/insights-operator-controller/logging/splunk.go:49:		LogAction				100.0%
github.com/RedHatInsights/insights-operator-controller/logging/splunk.go:62:		LogTriggerAction			100.0%
github.com/RedHatInsights/insights-operator-controller/logging/splunk.go:76:		LogWithTime				100.0%
github.com/RedHatInsights/insights-operator-controller/server/auth.go:44:		JWTAuthentication			0.0%
github.com/RedHatInsights/insights-operator-controller/server/cluster.go:36:		GetClusters				100.0%
github.com/RedHatInsights/insights-operator-controller/server/cluster.go:50:		NewCluster				100.0%
github.com/RedHatInsights/insights-operator-controller/server/cluster.go:92:		GetClusterByID				100.0%
github.com/RedHatInsights/insights-operator-controller/server/cluster.go:117:		DeleteCluster				88.9%
github.com/RedHatInsights/insights-operator-controller/server/cluster.go:151:		DeleteClusterByName			72.2%
github.com/RedHatInsights/insights-operator-controller/server/cluster.go:186:		SearchCluster				100.0%
github.com/RedHatInsights/insights-operator-controller/server/cluster.go:226:		oneOfIDOrNameValidation			87.5%
github.com/RedHatInsights/insights-operator-controller/server/cluster.go:243:		init					100.0%
github.com/RedHatInsights/insights-operator-controller/server/configuration.go:30:	sendConfiguration			100.0%
github.com/RedHatInsights/insights-operator-controller/server/configuration.go:37:	GetConfiguration			100.0%
github.com/RedHatInsights/insights-operator-controller/server/configuration.go:59:	DeleteConfiguration			100.0%
github.com/RedHatInsights/insights-operator-controller/server/configuration.go:86:	GetAllConfigurations			100.0%
github.com/RedHatInsights/insights-operator-controller/server/configuration.go:99:	GetClusterConfiguration			100.0%
github.com/RedHatInsights/insights-operator-controller/server/configuration.go:121:	EnableOrDisableConfiguration		100.0%
github.com/RedHatInsights/insights-operator-controller/server/configuration.go:161:	EnableConfiguration			100.0%
github.com/RedHatInsights/insights-operator-controller/server/configuration.go:166:	DisableConfiguration			100.0%
github.com/RedHatInsights/insights-operator-controller/server/configuration.go:171:	NewClusterConfiguration			100.0%
github.com/RedHatInsights/insights-operator-controller/server/configuration.go:226:	EnableClusterConfiguration		100.0%
github.com/RedHatInsights/insights-operator-controller/server/configuration.go:267:	DisableClusterConfiguration		100.0%
github.com/RedHatInsights/insights-operator-controller/server/operator.go:30:		ReadConfigurationForOperator		100.0%
github.com/RedHatInsights/insights-operator-controller/server/operator.go:59:		RegisterCluster				92.3%
github.com/RedHatInsights/insights-operator-controller/server/operator.go:88:		GetActiveTriggersForCluster		100.0%
github.com/RedHatInsights/insights-operator-controller/server/operator.go:110:		AckTriggerForCluster			100.0%
github.com/RedHatInsights/insights-operator-controller/server/profile.go:29:		ListConfigurationProfiles		100.0%
github.com/RedHatInsights/insights-operator-controller/server/profile.go:42:		GetConfigurationProfile			100.0%
github.com/RedHatInsights/insights-operator-controller/server/profile.go:64:		NewConfigurationProfile			100.0%
github.com/RedHatInsights/insights-operator-controller/server/profile.go:106:		DeleteConfigurationProfile		100.0%
github.com/RedHatInsights/insights-operator-controller/server/profile.go:133:		ChangeConfigurationProfile		100.0%
github.com/RedHatInsights/insights-operator-controller/server/server.go:71:		checkSplunkOperation			50.0%
github.com/RedHatInsights/insights-operator-controller/server/server.go:78:		createTLSServer				0.0%
github.com/RedHatInsights/insights-operator-controller/server/server.go:100:		countEndpoint				100.0%
github.com/RedHatInsights/insights-operator-controller/server/server.go:112:		retrievePositiveIntRequestParameter	88.9%
github.com/RedHatInsights/insights-operator-controller/server/server.go:128:		retrieveIDRequestParameter		100.0%
github.com/RedHatInsights/insights-operator-controller/server/server.go:133:		MainEndpoint				80.0%
github.com/RedHatInsights/insights-operator-controller/server/server.go:143:		logRequestHandler			100.0%
github.com/RedHatInsights/insights-operator-controller/server/server.go:150:		LogRequest				100.0%
github.com/RedHatInsights/insights-operator-controller/server/server.go:158:		AddDefaultHeaders			100.0%
github.com/RedHatInsights/insights-operator-controller/server/server.go:175:		Initialize				85.5%
github.com/RedHatInsights/insights-operator-controller/server/trigger.go:29:		GetAllTriggers				100.0%
github.com/RedHatInsights/insights-operator-controller/server/trigger.go:42:		GetTrigger				100.0%
github.com/RedHatInsights/insights-operator-controller/server/trigger.go:64:		DeleteTrigger				100.0%
github.com/RedHatInsights/insights-operator-controller/server/trigger.go:95:		ActivateTrigger				100.0%
github.com/RedHatInsights/insights-operator-controller/server/trigger.go:122:		DeactivateTrigger			100.0%
github.com/RedHatInsights/insights-operator-controller/server/trigger.go:149:		GetClusterTriggers			100.0%
github.com/RedHatInsights/insights-operator-controller/server/trigger.go:171:		RegisterClusterTrigger			100.0%
github.com/RedHatInsights/insights-operator-controller/storage/cluster.go:65:		mapCol					75.0%
github.com/RedHatInsights/insights-operator-controller/storage/cluster.go:77:		Map					85.7%
github.com/RedHatInsights/insights-operator-controller/storage/cluster.go:92:		NewClusterQuery				100.0%
github.com/RedHatInsights/insights-operator-controller/storage/cluster.go:113:		Query					100.0%
github.com/RedHatInsights/insights-operator-controller/storage/cluster.go:123:		Equals					100.0%
github.com/RedHatInsights/insights-operator-controller/storage/cluster.go:138:		WithPaging				100.0%
github.com/RedHatInsights/insights-operator-controller/storage/cluster.go:150:		mapCol					0.0%
github.com/RedHatInsights/insights-operator-controller/storage/cluster.go:166:		QueryOne				75.0%
github.com/RedHatInsights/insights-operator-controller/storage/cluster.go:183:		storageCols				100.0%
github.com/RedHatInsights/insights-operator-controller/storage/cluster.go:192:		ColNames				100.0%
github.com/RedHatInsights/insights-operator-controller/storage/errors.go:26:		Error					100.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:43:		enableForeignKeys			72.7%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:67:		New					90.9%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:88:		NewFromConnection			100.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:97:		Placeholder				100.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:102:		Connections				100.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:107:		Close					80.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:204:		ListOfClusters				87.5%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:235:		GetCluster				88.9%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:272:		RegisterNewCluster			88.9%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:294:		CreateNewCluster			90.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:316:		DeleteCluster				85.7%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:346:		DeleteClusterByName			85.7%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:376:		GetClusterByName			90.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:414:		ListConfigurationProfiles		90.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:450:		GetConfigurationProfile			91.7%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:492:		StoreConfigurationProfile		80.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:523:		ChangeConfigurationProfile		82.4%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:557:		DeleteConfigurationProfile		81.2%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:588:		readClusterConfigurations		88.9%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:620:		ListAllClusterConfigurations		100.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:635:		ListClusterConfiguration		71.4%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:655:		GetClusterConfigurationByID		86.7%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:690:		GetClusterActiveConfiguration		86.7%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:729:		GetConfigurationIDForCluster		91.7%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:760:		InsertNewConfigurationProfile		75.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:786:		SelectConfigurationProfileID		66.7%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:829:		DeactivatePreviousConfigurations	81.8%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:854:		InsertNewOperatorConfiguration		83.3%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:880:		CreateClusterConfiguration		48.5%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:940:		EnableClusterConfiguration		80.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:972:		DisableClusterConfiguration		80.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1003:		EnableOrDisableClusterConfigurationByID	85.7%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1035:		DeleteClusterConfigurationByID		76.9%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1063:		getTriggers				83.3%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1092:		GetTriggerByID				77.8%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1116:		execStatementAndGetRowsAffected		71.4%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1132:		DeleteTriggerByID			75.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1170:		ChangeStateOfTriggerByID		80.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1206:		ListAllTriggers				100.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1225:		ListClusterTriggers			85.7%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1250:		ListActiveClusterTriggers		85.7%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1275:		GetTriggerID				86.7%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1308:		NewTrigger				70.8%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1352:		NewTriggerType				76.9%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1379:		AckTrigger				77.8%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1419:		QueryOne				0.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1444:		Map					0.0%
github.com/RedHatInsights/insights-operator-controller/storage/storage.go:1457:		Ping					85.7%
github.com/RedHatInsights/insights-operator-controller/utils/maps.go:29:		mergeMapsT				100.0%
github.com/RedHatInsights/insights-operator-controller/utils/maps.go:55:		stringsMap				100.0%
github.com/RedHatInsights/insights-operator-controller/utils/maps.go:76:		LowerCaseKeys				100.0%
github.com/RedHatInsights/insights-operator-controller/utils/maps.go:87:		interMap				100.0%
github.com/RedHatInsights/insights-operator-controller/utils/maps.go:99:		MergeMaps				100.0%
github.com/RedHatInsights/insights-operator-controller/utils/utils.go:26:		ZeroValue				100.0%
github.com/RedHatInsights/insights-operator-controller/utils/validation.go:30:		DecodeValidRequest			100.0%
total:											(statements)				84.2%

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant