File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 22// or more contributor license agreements. Licensed under the Elastic License 2.0;
33// you may not use this file except in compliance with the Elastic License 2.0.
44
5+ //go:build requirefips
6+
57package main
68
79import (
@@ -23,7 +25,6 @@ func TestSubCommands(t *testing.T) {
2325
2426 assert .ElementsMatch (t , []string {
2527 "export" ,
26- "keystore" ,
2728 "run" ,
2829 "test" ,
2930 "version" ,
Original file line number Diff line number Diff line change 1+ // Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+ // or more contributor license agreements. Licensed under the Elastic License 2.0;
3+ // you may not use this file except in compliance with the Elastic License 2.0.
4+
5+ //go:build !requirefips
6+
7+ package main
8+
9+ import (
10+ "testing"
11+
12+ "github.com/stretchr/testify/assert"
13+
14+ "github.com/elastic/apm-server/internal/beatcmd"
15+ )
16+
17+ func TestSubCommands (t * testing.T ) {
18+ rootCmd := newXPackRootCommand (func (beatcmd.RunnerParams ) (beatcmd.Runner , error ) {
19+ panic ("unexpected call" )
20+ })
21+ var commands []string
22+ for _ , cmd := range rootCmd .Commands () {
23+ commands = append (commands , cmd .Name ())
24+ }
25+
26+ assert .ElementsMatch (t , []string {
27+ "export" ,
28+ "keystore" ,
29+ "run" ,
30+ "test" ,
31+ "version" ,
32+ }, commands )
33+ }
You can’t perform that action at this time.
0 commit comments