Skip to content

Conversation

tpereirasplunk
Copy link
Contributor

@tpereirasplunk tpereirasplunk commented Aug 23, 2021

Added test cases for S1, C3, M4 with manual poll

Test Scenario:

  • Setup config with app Framework enabled
  • System downloads Initial list of apps and installs them
  • Add new apps to S3
  • Set poll interval to 0 to disable polling
  • Wait for 2 mins to confirm that no apps were downloaded/installed/updated
  • Modify config map to trigger one time manual poll
  • Wait for system to be in ready state
  • Check pods for app install/update

Successful Run:

[2] • [SLOW TEST:479.969 seconds]
[2] s1appfw test
[2] /Users/tpereira/Git/splunk-operator/test/s1/appframework/appframework_test.go:31
[2]   appframework Standalone deployment (S1) with App Framework
[2]   /Users/tpereira/Git/splunk-operator/test/s1/appframework/appframework_test.go:249
[2]     appfwint, s1, appframework: can deploy a standalone instance with App Framework enabled for manual poll
[2]     /Users/tpereira/Git/splunk-operator/test/s1/appframework/appframework_test.go:250
[2] ------------------------------
[2] {"level":"info","ts":1629740550.3261619,"msg":"testenv deleted.\n","testenv":"s1appfw-fnq"}
[2]
[2] JUnit report was created: /Users/tpereira/Git/splunk-operator/test/s1/appframework/s1appfw-fnq_junit.xml
[2]
[2] Ran 1 of 3 Specs in 503.665 seconds
[2] SUCCESS! -- 1 Passed | 0 Failed | 2 Pending | 0 Skipped
[2] PASS


• [SLOW TEST:1559.642 seconds]
c3appfw test
/Users/tpereira/Git/splunk-operator/test/c3/appframework/appframework_test.go:30
  Single Site Indexer Cluster with SHC (C3) with App Framework
  /Users/tpereira/Git/splunk-operator/test/c3/appframework/appframework_test.go:558
    appfwint, c3, appframework: can deploy a C3 SVA with App Framework enabled for manual update
    /Users/tpereira/Git/splunk-operator/test/c3/appframework/appframework_test.go:559
------------------------------
{"level":"info","ts":1629928952.621782,"msg":"testenv deleted.\n","testenv":"c3appfw-yik"}
{"level":"info","ts":1629928952.621809,"msg":"testenv deleted.\n","testenv":"c3appfw-yik"}

JUnit report was created: /Users/tpereira/Git/splunk-operator/test/c3/appframework/c3appfw-yik_junit.xml

Ran 1 of 5 Specs in 1578.291 seconds
SUCCESS! -- 1 Passed | 0 Failed | 4 Pending | 0 Skipped
PASS


• [SLOW TEST:1180.835 seconds]
m4appfw test
/Users/tpereira/Git/splunk-operator/test/m4/appframework/appframework_test.go:30
  Multi Site Indexer Cluster with SHC (m4) with App Framework
  /Users/tpereira/Git/splunk-operator/test/m4/appframework/appframework_test.go:326
    m4, appframework: can deploy a M4 SVA with App Framework enabled for manual poll
    /Users/tpereira/Git/splunk-operator/test/m4/appframework/appframework_test.go:327
------------------------------
{"level":"info","ts":1629935341.705771,"msg":"testenv deleted.\n","testenv":"m4appfw-lah"}
{"level":"info","ts":1629935341.7058089,"msg":"testenv deleted.\n","testenv":"m4appfw-lah"}

JUnit report was created: /Users/tpereira/Git/splunk-operator/test/m4/appframework/m4appfw-lah_junit.xml

Ran 1 of 3 Specs in 1205.454 seconds
SUCCESS! -- 1 Passed | 0 Failed | 2 Pending | 0 Skipped
PASS

@tpereirasplunk tpereirasplunk force-pushed the CSPL-1235 branch 2 times, most recently from b01591f to 6775157 Compare August 26, 2021 00:49
@tpereirasplunk tpereirasplunk changed the title CSPL-1235: Manual poll CSPL-1235: Manual poll for app framework Automation Aug 26, 2021
@sgontla
Copy link
Contributor

sgontla commented Aug 31, 2021

The changes look good to me.
Since the framework deals with the CR Kind to trigger the functionality, in addition to the test cases covered here, It will be valuable to have a test case with multiple CRs of the same kind, and also, deleting one CR / adding another CR, when others are dealing with the trigger, and see if the apps get installed successfully, also, leaving the configMap in a clean state at the end of the test. May be we can have a follow-up Jira, to get that kind of coverage(?).
CC: @gaurav-splunk

@tpereirasplunk
Copy link
Contributor Author

The changes look good to me.
Since the framework deals with the CR Kind to trigger the functionality, in addition to the test cases covered here, It will be valuable to have a test case with multiple CRs of the same kind, and also, deleting one CR, when others are dealing with the trigger, and see if the apps get installed successfully, also, leaving the configMap in a clean state at the end of the test. May be we can have a follow-up Jira, to get that kind of coverage(?).
CC: @gaurav-splunk

We have ticket CSPL-1248 to look into those cases and another follow-up JIRA to automate the same

return stdout, nil
}

// GetConfigMap Gets the config map for a given k8 config map name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking. This copy of file from MC branch ?

})

Context("Single Site Indexer Cluster with SHC (C3) with App Framework", func() {
It("appfwint, c3, appframework: can deploy a C3 SVA with App Framework enabled for manual update", func() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should appfwint be replaced with integration? cc: @pdhanoyasplunk

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching it. Yes we should replace it with integration.

})

Context("Multi Site Indexer Cluster with SHC (m4) with App Framework", func() {
It("m4, appframework: can deploy a M4 SVA with App Framework enabled for manual poll", func() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add integration keyword.

})

Context("appframework Standalone deployment (S1) with App Framework", func() {
It("appfwint, s1, appframework: can deploy a standalone instance with App Framework enabled for manual poll", func() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove appfwint and add integration keyword

@pdhanoya-splunk pdhanoya-splunk marked this pull request as draft September 2, 2021 18:36
@pdhanoya-splunk pdhanoya-splunk marked this pull request as ready for review September 2, 2021 21:54
@pdhanoya-splunk pdhanoya-splunk changed the base branch from feature-appframework to develop September 2, 2021 21:54
@pdhanoya-splunk pdhanoya-splunk changed the base branch from develop to feature-appframework September 2, 2021 21:55
}

// GeneratePodNameSlice returns slice of PodNames based on given key and count.
func GeneratePodNameSlice(formatString string, key string, count int, multisite bool, siteCount int) []string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look like this is being used..meant for future? Any idea @pdhanoyasplunk or @jambrosiano ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is brought in from MC feature branch where this method is used.

Copy link
Contributor

@smohan-splunk smohan-splunk Sep 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, this will cause a conflict in one of the feature branches when the first one gets merged to develop. Will merge this for now, but in the future request is to add common functions to develop and pull them into the feature branches to avoid additional conflict resolution work

cc: @kashok-splunk , @sgontla , @gaurav-splunk

@smohan-splunk smohan-splunk merged commit 0f3f74f into feature-appframework Sep 3, 2021
gaurav-splunk pushed a commit that referenced this pull request Sep 22, 2021
@tpereirasplunk tpereirasplunk deleted the CSPL-1235 branch October 29, 2021 22: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.

6 participants