Skip to content

Commit

Permalink
ocmcmds
Browse files Browse the repository at this point in the history
  • Loading branch information
hilmarf committed Jan 8, 2025
1 parent 3f7944c commit a594c9c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/common/inputs/cpi/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const ProcessSpecUsage = `
////////////////////////////////////////////////////////////////////////////////

type MediaFileSpec struct {
// PathSpec holds the path that points to a file to be the base for the imput
// PathSpec holds the path that points to a file to be the base for the input
PathSpec `json:",inline"`
ProcessSpec `json:",inline"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (o *Option) Complete(args []string) ([]string, error) {

func (o *Option) Usage() string {
s := `
The <code>--path</code> options accets a sequence of identities,
The <code>--path</code> options accepts a sequence of identities,
that will be used to follow component references a the specified
component(s).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ func (o *RegistrationOption) HasRegistrations() bool {
func (o *RegistrationOption) Configure(ctx clictx.Context) error {
for n, v := range o.spec {
var prio *int
nam := n
name := n
art := ""
med := ""
i := strings.Index(nam, ":")
i := strings.Index(name, ":")
if i >= 0 {
art = nam[i+1:]
nam = nam[:i]
art = name[i+1:]
name = name[:i]
}
i = strings.Index(art, ":")
if i >= 0 {
Expand Down Expand Up @@ -112,7 +112,7 @@ func (o *RegistrationOption) Configure(ctx clictx.Context) error {
}

o.Registrations = append(o.Registrations, &Registration{
Name: nam,
Name: name,
ArtifactType: art,
MediaType: med,
Prio: prio,
Expand Down
2 changes: 1 addition & 1 deletion cmds/ocm/commands/ocmcmds/references/get/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ COMPONENTVERSION NAME COMPONENT VERSION IDENTITY
`))
})

It("lits reference closure in ctf file", func() {
It("list reference closure in ctf file", func() {
buf := bytes.NewBuffer(nil)
Expect(env.CatchOutput(buf).Execute("get", "references", "-r", "-o", "tree", "--lookup", CTF, CA)).To(Succeed())
Expect(buf.String()).To(StringEqualTrimmedWithContext(
Expand Down
4 changes: 2 additions & 2 deletions cmds/ocm/commands/ocmcmds/resources/download/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (o *Command) ForName(name string) *cobra.Command {
Short: "download resources of a component version",
Long: `
Download resources of a component version. Resources are specified
by identities. An identity consists of
by identities. An identity consists of
a name argument followed by optional <code>&lt;key>=&lt;value></code>
arguments.
Expand Down Expand Up @@ -149,7 +149,7 @@ func (o *Command) Run() (err error) {

if storeoption.From(o).Store != nil {
if From(opts).UseHandlers {
return errors.Newf("verification fot supported together with download handlers")
return errors.Newf("verification for supported together with download handlers")
}
}

Expand Down
4 changes: 2 additions & 2 deletions cmds/ocm/commands/ocmcmds/routingslips/get/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ test.de/x:v1 acme.org comment ` + e1a.Timestamp.String() + ` Comment: first
e2a = Must(routingslip.AddEntry(cv, OTHER, rsa.Algorithm, comment.New("first other entry"), nil))
e2b = Must(routingslip.AddEntry(cv, OTHER, rsa.Algorithm, comment.New("second other entry"), nil))

te := Must(routingslip.NewGenericEntryWith("acme.org/test",
entry := Must(routingslip.NewGenericEntryWith("acme.org/test",
"name", "unit-tests",
"status", "passed",
))
e2c = Must(routingslip.AddEntry(cv, OTHER, rsa.Algorithm, te, nil))
e2c = Must(routingslip.AddEntry(cv, OTHER, rsa.Algorithm, entry, nil))

MustBeSuccessful(cv.Update())
})
Expand Down

0 comments on commit a594c9c

Please sign in to comment.