-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install Test Storage Backend for Hub when
USE_TEST_SETUP=true
(#655)
- Install Test Storage Backend for Hub when USE_TEST_SETUP=true - Generate documentation for Populator
- Loading branch information
Showing
28 changed files
with
441 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"capact.io/capact/internal/frontmatter" | ||
"github.com/spf13/cobra" | ||
"github.com/spf13/cobra/doc" | ||
) | ||
|
||
const ( | ||
docsTargetDir = "./cmd/populator/docs" | ||
) | ||
|
||
// NewDocs returns a cobra.Command for generating Populator documentation. | ||
func NewDocs(cliName string) *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "gen-usage-docs", | ||
Hidden: true, | ||
Short: "Generate usage documentation", | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
root := NewRoot(cliName) | ||
root.DisableAutoGenTag = true | ||
|
||
defaultLinkHandler := func(s string) string { return s } | ||
return doc.GenMarkdownTreeCustom(root, docsTargetDir, frontmatter.FilePrepender, defaultLinkHandler) | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package register | ||
|
||
import ( | ||
"capact.io/capact/internal/cli/testing" | ||
"github.com/docker/cli/cli" | ||
"github.com/spf13/cobra" | ||
|
||
"capact.io/capact/internal/cli/heredoc" | ||
) | ||
|
||
// NewTestStorageBackend returns a cobra.Command for populating storage backend TypeInstance for testing purposes. | ||
func NewTestStorageBackend(cliName string) *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "test-storage-backend", | ||
Short: "Produces and uploads TypeInstances which describe storage backend for testing purposes", | ||
Example: heredoc.WithCLIName(` | ||
<cli> test-storage-backend | ||
`, cliName), | ||
Args: cli.RequiresMaxArgs(1), | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
storageRegister, err := testing.NewStorageBackendRegister() | ||
if err != nil { | ||
return err | ||
} | ||
return storageRegister.RegisterTypeInstances(cmd.Context()) | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: populator | ||
--- | ||
|
||
## populator | ||
|
||
|
||
|
||
``` | ||
populator [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for populator | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [populator register](populator_register.md) - This command consists of multiple subcommands which allows you to register Capact resources | ||
|
21 changes: 0 additions & 21 deletions
21
cmd/populator/docs/populator_register-capact-installation.md
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: populator register | ||
--- | ||
|
||
## populator register | ||
|
||
This command consists of multiple subcommands which allows you to register Capact resources | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for register | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [populator](populator.md) - | ||
* [populator register capact-installation](populator_register_capact-installation.md) - Produces and uploads TypeInstances which describe Capact installation | ||
* [populator register ocf-manifests](populator_register_ocf-manifests.md) - Populates locally available manifests into Neo4j database | ||
* [populator register test-storage-backend](populator_register_test-storage-backend.md) - Produces and uploads TypeInstances which describe storage backend for testing purposes | ||
|
29 changes: 29 additions & 0 deletions
29
cmd/populator/docs/populator_register_capact-installation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: populator register capact-installation | ||
--- | ||
|
||
## populator register capact-installation | ||
|
||
Produces and uploads TypeInstances which describe Capact installation | ||
|
||
``` | ||
populator register capact-installation [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
populator capact-installation | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for capact-installation | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [populator register](populator_register.md) - This command consists of multiple subcommands which allows you to register Capact resources | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: populator register ocf-manifests | ||
--- | ||
|
||
## populator register ocf-manifests | ||
|
||
Populates locally available manifests into Neo4j database | ||
|
||
``` | ||
populator register ocf-manifests [MANIFEST_PATH] [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
APP_JSON_PUBLISH_ADDR=http://{HOST_IP} populator . | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for ocf-manifests | ||
--source strings Manifests location | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [populator register](populator_register.md) - This command consists of multiple subcommands which allows you to register Capact resources | ||
|
29 changes: 29 additions & 0 deletions
29
cmd/populator/docs/populator_register_test-storage-backend.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: populator register test-storage-backend | ||
--- | ||
|
||
## populator register test-storage-backend | ||
|
||
Produces and uploads TypeInstances which describe storage backend for testing purposes | ||
|
||
``` | ||
populator register test-storage-backend [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
populator test-storage-backend | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for test-storage-backend | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [populator register](populator_register.md) - This command consists of multiple subcommands which allows you to register Capact resources | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.