Skip to content

Commit

Permalink
parameters.isc on iris has a different key for the owner than on cach…
Browse files Browse the repository at this point in the history
…e/ensemble
  • Loading branch information
b-dean committed Feb 22, 2024
1 parent ba2bedb commit ea9558a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/golangci/golangci-lint
rev: v1.56.0
hooks:
- id: golangci-lint
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build:

test:
mkdir -p test_results
ginkgo -r -cover --junit-report test_results/junit-isclib.xml
go run github.com/onsi/ginkgo/v2/ginkgo -r -cover --junit-report test_results/junit-isclib.xml

watch:
ginkgo watch -r -cover
Expand Down
19 changes: 13 additions & 6 deletions instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ const (
primaryJournalPattern = "CurrentDirectory=(.+)"
alternateJournalPattern = "AlternateDirectory=(.+)"
//regex to remove the [ ,1,,, etc. ] configuration on InterSystems DAT lines
extraInfoPattern = "(1+|,+)"
managerUserKey = "security_settings.manager_user"
managerGroupKey = "security_settings.manager_group"
ownerUserKey = "security_settings.cache_user"
ownerGroupKey = "security_settings.cache_group"
extraInfoPattern = "(1+|,+)"
managerUserKey = "security_settings.manager_user"
managerGroupKey = "security_settings.manager_group"
ownerUserKey = "security_settings.cache_user"
ownerGroupKey = "security_settings.cache_group"
irisOwnerUserKey = "security_settings.iris_user"
irisOwnerGroupKey = "security_settings.iris_group"
// DefaultImportQualifiers are the default ISC qualifiers used for importing source
DefaultImportQualifiers = "/compile/keepsource/expand/multicompile"
// CacheDatName is the common name for a Cache database file
Expand Down Expand Up @@ -230,7 +232,12 @@ func (i *Instance) DetermineManager() (string, string, error) {
// The owner is the user which owns the files from the installers and as who most Caché processes will be running.
// It returns the owner and owner group as strings and any error encountered.
func (i *Instance) DetermineOwner() (string, string, error) {
return i.getUserAndGroupFromParameters("Owner", ownerUserKey, ownerGroupKey)
switch i.Product {
case Iris:
return i.getUserAndGroupFromParameters("Owner", irisOwnerUserKey, irisOwnerGroupKey)
default:
return i.getUserAndGroupFromParameters("Owner", ownerUserKey, ownerGroupKey)
}
}

// DeterminePrimaryJournalDirectory will parse the ISC instance's CPF file for its primary journal directory (CurrentDirectory).
Expand Down

0 comments on commit ea9558a

Please sign in to comment.