Documentation
¶
Index ¶
- Constants
- Variables
- func CreateTestBearerCredentialsHome(t *testing.T) string
- func RunAccountHappyPath(t *testing.T, tc TestConfig, testEthURL, chainName string)
- func RunHappyPath1Workflow(t *testing.T, tc TestConfig)
- func RunHappyPath2Workflow(t *testing.T, tc TestConfig)
- func RunHappyPath3aWorkflow(t *testing.T, tc TestConfig, projectName, ownerAddress, ethUrl string)
- func RunHappyPath3bWorkflow(t *testing.T, tc TestConfig)
- func RunPrivateRegistryAuthAndSettingsFinalize(t *testing.T, envPath, blankWorkflowDir string)
- func RunPrivateRegistryE2E(t *testing.T, tc TestConfig, envPath, blankWorkflowDir string)
- func RunSecretsHappyPath(t *testing.T, tc TestConfig, chainName string)
- func RunSecretsListMsig(t *testing.T, tc TestConfig, chainName string)
- func RunSimulationHappyPath(t *testing.T, tc TestConfig, projectDir string)
- func RunWorkflowActivatePrivateRegistryHappyPath(t *testing.T, tc TestConfig)
- func RunWorkflowDeletePrivateRegistryHappyPath(t *testing.T, tc TestConfig)
- func RunWorkflowPausePrivateRegistryHappyPath(t *testing.T, tc TestConfig)
- func RunWorkflowPrivateRegistryHappyPath(t *testing.T, tc TestConfig)
- func StripANSI(s string) string
- type TestConfig
Constants ¶
const MockDerivedWorkflowOwnerHex = "ab12cd34ef56ab12cd34ef56ab12cd34ef56ab12"
MockDerivedWorkflowOwnerHex is the raw address (no 0x) in getCreOrganizationInfo.derivedWorkflowOwners in tests. The canonical checksummed form is privateRegistryOwnerAddress.
Variables ¶
var CLIPath = os.TempDir() + string(os.PathSeparator) + "cre" + func() string { if os.PathSeparator == '\\' { return ".exe" } return "" }()
CLI path for testing
Functions ¶
func CreateTestBearerCredentialsHome ¶ added in v1.12.0
CreateTestBearerCredentialsHome writes JWT bearer credentials under HOME/.cre for subprocess CLI tests.
func RunAccountHappyPath ¶
func RunAccountHappyPath(t *testing.T, tc TestConfig, testEthURL, chainName string)
RunAccountHappyPath runs the complete account happy path workflow: Link -> List -> Unlink -> List (verify unlinked)
func RunHappyPath1Workflow ¶
func RunHappyPath1Workflow(t *testing.T, tc TestConfig)
RunHappyPath1Workflow runs the complete happy path 1 workflow: Deploy -> Pause -> Activate -> Delete
func RunHappyPath2Workflow ¶
func RunHappyPath2Workflow(t *testing.T, tc TestConfig)
RunHappyPath2Workflow runs the complete happy path 2 workflow: Deploy -> Deploy update with config
func RunHappyPath3aWorkflow ¶
func RunHappyPath3aWorkflow(t *testing.T, tc TestConfig, projectName, ownerAddress, ethUrl string)
RunHappyPath3aWorkflow runs happy path 3a: Init → Deploy with unlinked key (tests auto-link initiation) This test validates the auto-link flow is triggered but uses --unsigned to avoid contract verification
func RunHappyPath3bWorkflow ¶
func RunHappyPath3bWorkflow(t *testing.T, tc TestConfig)
RunHappyPath3bWorkflow runs happy path 3b: Deploy with linked key + config This test validates successful deployment with config when the key is already linked Note: The workflow directory is created with config-path already set by createWorkflowDirectory
func RunPrivateRegistryAuthAndSettingsFinalize ¶ added in v1.12.0
RunPrivateRegistryAuthAndSettingsFinalize asserts .env has no private key, runs auth validation against a minimal GraphQL mock (getCreOrganizationInfo), then loads settings from disk and finalizes org-derived workflow owner for deployment-registry reg-test.
func RunPrivateRegistryE2E ¶ added in v1.12.0
func RunPrivateRegistryE2E(t *testing.T, tc TestConfig, envPath, blankWorkflowDir string)
RunPrivateRegistryE2E runs auth/settings finalize (no private key) then the full CLI private-registry lifecycle (deploy, pause, activate, delete) with httptest GraphQL mocks.
func RunSecretsHappyPath ¶
func RunSecretsHappyPath(t *testing.T, tc TestConfig, chainName string)
RunSecretsHappyPath runs the complete secrets happy path workflow: Create -> Update -> List -> Delete
func RunSecretsListMsig ¶
func RunSecretsListMsig(t *testing.T, tc TestConfig, chainName string)
RunSecretsListMsig on unsigned
func RunSimulationHappyPath ¶
func RunSimulationHappyPath(t *testing.T, tc TestConfig, projectDir string)
Simulates a workflow
func RunWorkflowActivatePrivateRegistryHappyPath ¶ added in v1.12.0
func RunWorkflowActivatePrivateRegistryHappyPath(t *testing.T, tc TestConfig)
RunWorkflowActivatePrivateRegistryHappyPath runs the workflow activate happy path for private registry.
func RunWorkflowDeletePrivateRegistryHappyPath ¶ added in v1.12.0
func RunWorkflowDeletePrivateRegistryHappyPath(t *testing.T, tc TestConfig)
RunWorkflowDeletePrivateRegistryHappyPath runs the workflow delete happy path for private registry.
func RunWorkflowPausePrivateRegistryHappyPath ¶ added in v1.12.0
func RunWorkflowPausePrivateRegistryHappyPath(t *testing.T, tc TestConfig)
RunWorkflowPausePrivateRegistryHappyPath runs the workflow pause happy path for private registry.
func RunWorkflowPrivateRegistryHappyPath ¶ added in v1.11.0
func RunWorkflowPrivateRegistryHappyPath(t *testing.T, tc TestConfig)
RunWorkflowPrivateRegistryHappyPath runs the workflow deploy happy path for private registry.
Types ¶
type TestConfig ¶
TestConfig represents test configuration