Skip to content

Commit 3d6f325

Browse files
committed
v0.1.6 service: rename probe to verify
1 parent 5b34c9a commit 3d6f325

22 files changed

+281
-272
lines changed

cmd.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ var rootDef = CmdDef{
156156
Short: "Fetch Environment Variables for Service",
157157
},
158158
{
159-
Name: "probe",
159+
Name: "verify",
160160

161-
Use: "probe <service> [flags]",
161+
Use: "verify <service> [flags]",
162162
Args: cobra.NoArgs,
163-
Short: "Probe a service for proper TLS setup & configuration",
163+
Short: "Verify Service TLS Setup and Configuration",
164164
},
165165
},
166166
},

config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ type Config struct {
7373
EnvOutput string `env:"ENV_OUTPUT" toml:",omitempty,readonly"`
7474
CertStyle string `env:"CERT_STYLE" toml:"cert-style,omitempty"`
7575

76-
Probe struct {
77-
Timeout time.Duration `default:"2m" env:"PROBE_TIMEOUT" toml:",omitempty,readonly"`
76+
Verify struct {
77+
Timeout time.Duration `default:"2m" env:"VERIFY_TIMEOUT" toml:",omitempty,readonly"`
7878
} `toml:",omitempty,readonly"`
7979
} `toml:"service,omitempty"`
8080

lcl/testdata/TestLcl/non-personal-cas-missing-unix.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,5 +570,5 @@
570570

571571
# Next Steps
572572
! (Re)Start your server.
573-
! Check out your encrypted site: https://service.lcl.host:4433
573+
! Verify TLS setup and configuration: run `anchor service verify --org ankyco --realm development --service service-name`.
574574
| These certificates will renew automatically, time to enjoy effortless encryption.

lcl/testdata/TestLcl/non-personal-cas-missing-windows.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,5 +572,5 @@
572572

573573
# Next Steps
574574
! (Re)Start your server.
575-
! Check out your encrypted site: https://service.lcl.host:4433
575+
! Verify TLS setup and configuration: run `anchor service verify --org ankyco --realm development --service service-name`.
576576
| These certificates will renew automatically, time to enjoy effortless encryption.

lcl/testdata/TestSetup/existing-service-basics-unix.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,5 @@
154154

155155
# Next Steps
156156
! (Re)Start your server.
157-
! Check out your encrypted site: https://service.lcl.host:4433
157+
! Verify TLS setup and configuration: run `anchor service verify --org org-slug --realm realm-slug --service service-name`.
158158
| These certificates will renew automatically, time to enjoy effortless encryption.

lcl/testdata/TestSetup/existing-service-basics-windows.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,5 @@
154154

155155
# Next Steps
156156
! (Re)Start your server.
157-
! Check out your encrypted site: https://service.lcl.host:4433
157+
! Verify TLS setup and configuration: run `anchor service verify --org org-slug --realm realm-slug --service service-name`.
158158
| These certificates will renew automatically, time to enjoy effortless encryption.

service/env.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,10 @@ func (c *Env) Perform(ctx context.Context, drv *ui.Driver) error {
196196
}
197197

198198
drv.Activate(ctx, &models.EnvNextSteps{
199-
LclUrl: lclUrl,
199+
LclUrl: lclUrl,
200+
OrgApid: orgAPID,
201+
RealmApid: realmAPID,
202+
ServiceApid: serviceAPID,
200203
})
201204

202205
return nil

service/models/env.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func (m *EnvDisplay) View() string {
211211
}
212212

213213
type EnvNextSteps struct {
214-
LclUrl string
214+
LclUrl, OrgApid, RealmApid, ServiceApid string
215215
}
216216

217217
func (m *EnvNextSteps) Init() tea.Cmd { return nil }
@@ -224,7 +224,13 @@ func (m *EnvNextSteps) View() string {
224224
fmt.Fprintln(&b, ui.Header("Next Steps"))
225225
fmt.Fprintln(&b, ui.StepAlert(ui.Action("(Re)Start your server.")))
226226
if m.LclUrl != "" {
227-
fmt.Fprintln(&b, ui.StepAlert(fmt.Sprintf("%s: %s", ui.Action("Check out your encrypted site"), ui.URL(m.LclUrl))))
227+
fmt.Fprintln(&b, ui.StepAlert(
228+
fmt.Sprintf("%s: run `anchor service verify --org %s --realm %s --service %s`.",
229+
ui.Action("Verify TLS setup and configuration"),
230+
m.OrgApid,
231+
m.RealmApid,
232+
m.ServiceApid,
233+
)))
228234
}
229235
fmt.Fprintln(&b, ui.StepHint("These certificates will renew automatically, time to enjoy effortless encryption."))
230236

service/models/probe.go renamed to service/models/verify.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ import (
1010
)
1111

1212
var (
13-
ProbeHeader = ui.Section{
14-
Name: "ProbeHeader",
13+
VerifyHeader = ui.Section{
14+
Name: "VerifyHeader",
1515
Model: ui.MessageLines{
16-
ui.Header(fmt.Sprintf("Probe Service TLS Setup and Configuration %s", ui.Whisper("`anchor service probe`"))),
16+
ui.Header(fmt.Sprintf("Verify Service TLS Setup and Configuration %s", ui.Whisper("`anchor service verify`"))),
1717
},
1818
}
1919

20-
ProbeHint = ui.Section{
21-
Name: "ProbeHint",
20+
VerifyHint = ui.Section{
21+
Name: "VerifyHint",
2222
Model: ui.MessageLines{
2323
ui.StepHint("We'll check your running app to ensure TLS works as expected."),
2424
},

service/testdata/TestCmdServiceProbe/--help.golden

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)