@@ -70,6 +70,27 @@ func TestGetSplunkServiceName(t *testing.T) {
7070 test ("splunk-stack1-license-manager-service" , SplunkLicenseManager , LicenseManagerRefName , false )
7171}
7272
73+ func TestGetSplunkAppRuntimeServiceName (t * testing.T ) {
74+ test := func (want string , instanceType InstanceType , identifier string ) {
75+ got := GetSplunkAppRuntimeServiceName (instanceType , identifier )
76+ if got != want {
77+ t .Errorf ("GetSplunkAppRuntimeServiceName(\" %s\" ,\" %s\" ) = %s; want %s" ,
78+ instanceType .ToString (), identifier , got , want )
79+ }
80+ }
81+
82+ test ("splunk-t1-standalone-appruntime-headless" , SplunkStandalone , "t1" )
83+ test ("splunk-t2-cluster-manager-appruntime-headless" , SplunkClusterManager , "t2" )
84+ }
85+
86+ func TestGetSplunkAppRuntimeServiceFQDN (t * testing.T ) {
87+ want := "splunk-t1-search-head-appruntime-headless.splunktest.svc.cluster.local"
88+ got := GetSplunkAppRuntimeServiceFQDN ("splunktest" , SplunkSearchHead , "t1" )
89+ if got != want {
90+ t .Errorf ("GetSplunkAppRuntimeServiceFQDN() = %s; want %s" , got , want )
91+ }
92+ }
93+
7394func TestGetSplunkDefaultsName (t * testing.T ) {
7495 got := GetSplunkDefaultsName ("t1" , SplunkSearchHead )
7596 want := "splunk-t1-search-head-defaults"
0 commit comments