Skip to content

Commit

Permalink
set hard coded collector app endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
shirmoran committed Jan 25, 2024
1 parent 0cf057b commit 213e1bb
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/pre-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ jobs:
- name: 'Test: Run Smoke Tests in a TNF container'
run: TNF_LOG_LEVEL=${TNF_SMOKE_TESTS_LOG_LEVEL} TNF_ENABLE_DATA_COLLECTION=true ./run-tnf-container.sh ${{ env.TESTING_CMD_PARAMS }} -l "${SMOKE_TESTS_LABELS_FILTER}"

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3

- name: Run sanity check on collector
uses: ./collector/.github/actions/run-sanity-check
with:
Expand Down
1 change: 0 additions & 1 deletion cnf-certification-test/tnf_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ servicesignorelist:
- "hazelcast-platform-webhook-service"
- "new-pro-controller-manager-metrics-service"
- "mysql"
collectorAppEndPoint: ""
executedBy: ""
partnerName: ""
collectorAppPassword: ""
3 changes: 0 additions & 3 deletions cnf-certification-test/webserver/webserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,6 @@ func updateTnf(tnfConfig []byte, data *RequestedData) []byte {
if len(data.CollectorAppEndPoint) > 0 {
config.CollectorAppEndPoint = data.CollectorAppEndPoint[0]
}
if len(data.CollectorAppPassword) > 0 {
config.CollectorAppPassword = data.CollectorAppPassword[0]
}
if len(data.ExecutedBy) > 0 {
config.ExecutedBy = data.ExecutedBy[0]
}
Expand Down
2 changes: 0 additions & 2 deletions pkg/autodiscover/autodiscover.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ type DiscoveredTestData struct {
CollectorAppEndPoint string
ExecutedBy string
PartnerName string
CollectorAppPassword string
}

type labelObject struct {
Expand Down Expand Up @@ -251,7 +250,6 @@ func DoAutoDiscover(config *configuration.TestConfiguration) DiscoveredTestData
data.CollectorAppEndPoint = config.CollectorAppEndPoint
data.ExecutedBy = config.ExecutedBy
data.PartnerName = config.PartnerName
data.CollectorAppPassword = config.CollectorAppPassword

return data
}
Expand Down
5 changes: 3 additions & 2 deletions pkg/certsuite/certsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ func LoadChecksDB(labelsExpr string) {
}

const (
junitXMLOutputFile = "cnf-certification-tests_junit.xml"
junitXMLOutputFile = "cnf-certification-tests_junit.xml"
collectorAppEndPoint = "http://44.195.143.94"
)

func getK8sClientsConfigFileNames() []string {
Expand Down Expand Up @@ -150,7 +151,7 @@ func Run(labelsFilter, outputFolder string) error {

// Send claim file to the collector if specified by env var
if configuration.GetTestParameters().EnableDataCollection {
err = collector.SendClaimFileToCollector(env.CollectorAppEndPoint, claimOutputFile, env.ExecutedBy, env.PartnerName, env.CollectorAppPassword)
err = collector.SendClaimFileToCollector(env.CollectorAppEndPoint, claimOutputFile, env.ExecutedBy, env.PartnerName, collectorAppEndPoint)
if err != nil {
log.Error("Failed to send post request to the collector: %v", err)
}
Expand Down
1 change: 0 additions & 1 deletion pkg/configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ type TestConfiguration struct {
CollectorAppEndPoint string `yaml:"collectorAppEndPoint,omitempty" json:"collectorAppEndPoint,omitempty"`
ExecutedBy string `yaml:"executedBy,omitempty" json:"executedBy,omitempty"`
PartnerName string `yaml:"partnerName,omitempty" json:"partnerName,omitempty"`
CollectorAppPassword string `yaml:"collectorAppPassword,omitempty" json:"collectorAppPassword,omitempty"`
}

type TestParameters struct {
Expand Down
2 changes: 0 additions & 2 deletions pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ type TestEnvironment struct { // rename this with testTarget
CollectorAppEndPoint string
ExecutedBy string
PartnerName string
CollectorAppPassword string
}

type MachineConfig struct {
Expand Down Expand Up @@ -298,7 +297,6 @@ func buildTestEnvironment() { //nolint:funlen
env.CollectorAppEndPoint = data.CollectorAppEndPoint
env.ExecutedBy = data.ExecutedBy
env.PartnerName = data.PartnerName
env.CollectorAppPassword = data.CollectorAppPassword

operators := createOperators(data.Csvs, data.Subscriptions, data.AllInstallPlans, data.AllCatalogSources, false, true)
env.Operators = operators
Expand Down

0 comments on commit 213e1bb

Please sign in to comment.