rename fgj to fj
Module path, binary name, config dir, help text, and docs all updated from fgj-sid/fgj to fj.
This commit is contained in:
parent
a6cf9a7096
commit
bc43f6e5a5
34 changed files with 479 additions and 479 deletions
|
|
@ -228,15 +228,15 @@ func (env *TestEnv) CleanupRepo(owner, repoName string) {
|
|||
}
|
||||
}
|
||||
|
||||
// GetBinaryPath returns the path to the built fgj binary
|
||||
// GetBinaryPath returns the path to the built fj binary
|
||||
func (env *TestEnv) GetBinaryPath() string {
|
||||
binaryPath := os.Getenv("FGJ_BINARY_PATH")
|
||||
if binaryPath == "" {
|
||||
// Look for the binary in common locations
|
||||
candidates := []string{
|
||||
"./bin/fgj",
|
||||
"bin/fgj",
|
||||
"/home/romain/work/fgj/bin/fgj",
|
||||
"./bin/fj",
|
||||
"bin/fj",
|
||||
"/home/romain/work/fj/bin/fj",
|
||||
}
|
||||
for _, candidate := range candidates {
|
||||
if _, err := os.Stat(candidate); err == nil {
|
||||
|
|
@ -248,7 +248,7 @@ func (env *TestEnv) GetBinaryPath() string {
|
|||
}
|
||||
}
|
||||
// If no binary found, return default (will error when executed)
|
||||
binaryPath = "./bin/fgj"
|
||||
binaryPath = "./bin/fj"
|
||||
}
|
||||
return binaryPath
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ func TestCLIIssueCreate(t *testing.T) {
|
|||
"-R", fmt.Sprintf("%s/%s", env.Owner, env.RepoName),
|
||||
"issue", "create",
|
||||
"-t", "[FGJ E2E Test] CLI Created Issue",
|
||||
"-b", "Created directly via fgj CLI",
|
||||
"-b", "Created directly via fj CLI",
|
||||
)
|
||||
|
||||
if result.ExitCode != 0 {
|
||||
|
|
@ -624,14 +624,14 @@ func TestCLIPRComment(t *testing.T) {
|
|||
"-R", fmt.Sprintf("%s/%s", env.Owner, env.RepoName),
|
||||
"pr", "comment",
|
||||
fmt.Sprintf("%d", issueNum),
|
||||
"-b", "Automated test comment via fgj pr comment",
|
||||
"-b", "Automated test comment via fj pr comment",
|
||||
)
|
||||
|
||||
if result.ExitCode != 0 {
|
||||
t.Fatalf("pr comment failed with exit code %d: %s", result.ExitCode, result.Stderr)
|
||||
}
|
||||
|
||||
t.Logf("Successfully commented on issue #%d via fgj pr comment", issueNum)
|
||||
t.Logf("Successfully commented on issue #%d via fj pr comment", issueNum)
|
||||
}
|
||||
|
||||
// ===== CLI Repo Commands =====
|
||||
|
|
@ -678,14 +678,14 @@ func TestCLIRepoList(t *testing.T) {
|
|||
func TestCLIRepoCreate(t *testing.T) {
|
||||
env := NewTestEnv(t)
|
||||
|
||||
repoName := fmt.Sprintf("fgj-test-create-%d", time.Now().UnixNano())
|
||||
repoName := fmt.Sprintf("fj-test-create-%d", time.Now().UnixNano())
|
||||
defer env.CleanupRepo(env.Owner, repoName)
|
||||
|
||||
result := env.RunCLI(
|
||||
"--hostname", env.Hostname,
|
||||
"repo", "create", repoName,
|
||||
"--public",
|
||||
"-d", "Created by fgj functional test",
|
||||
"-d", "Created by fj functional test",
|
||||
)
|
||||
|
||||
if result.ExitCode != 0 {
|
||||
|
|
@ -703,8 +703,8 @@ func TestCLIRepoCreate(t *testing.T) {
|
|||
if repo.Private {
|
||||
t.Fatalf("expected public repo, got private")
|
||||
}
|
||||
if repo.Description != "Created by fgj functional test" {
|
||||
t.Fatalf("expected description %q, got %q", "Created by fgj functional test", repo.Description)
|
||||
if repo.Description != "Created by fj functional test" {
|
||||
t.Fatalf("expected description %q, got %q", "Created by fj functional test", repo.Description)
|
||||
}
|
||||
|
||||
t.Logf("Successfully created repository %s via CLI", repo.FullName)
|
||||
|
|
@ -756,7 +756,7 @@ func TestCLIRepoClone(t *testing.T) {
|
|||
env := NewTestEnv(t)
|
||||
|
||||
tmpDir := t.TempDir()
|
||||
clonePath := fmt.Sprintf("%s/fgj-clone", tmpDir)
|
||||
clonePath := fmt.Sprintf("%s/fj-clone", tmpDir)
|
||||
|
||||
result := env.RunCLI(
|
||||
"--hostname", env.Hostname,
|
||||
|
|
@ -799,13 +799,13 @@ func TestCLIReleaseList(t *testing.T) {
|
|||
func TestCLIReleaseCreateUploadDelete(t *testing.T) {
|
||||
env := NewTestEnv(t)
|
||||
|
||||
tag := fmt.Sprintf("fgj-test-%d", time.Now().UnixNano())
|
||||
tag := fmt.Sprintf("fj-test-%d", time.Now().UnixNano())
|
||||
title := "FGJ CLI Release Test"
|
||||
notes := "Release created by functional tests"
|
||||
|
||||
tmpDir := t.TempDir()
|
||||
assetPath := fmt.Sprintf("%s/asset.txt", tmpDir)
|
||||
if err := os.WriteFile(assetPath, []byte("fgj release asset"), 0600); err != nil {
|
||||
if err := os.WriteFile(assetPath, []byte("fj release asset"), 0600); err != nil {
|
||||
t.Fatalf("failed to create asset file: %v", err)
|
||||
}
|
||||
|
||||
|
|
@ -863,7 +863,7 @@ func TestCLIReleaseView(t *testing.T) {
|
|||
env := NewTestEnv(t)
|
||||
|
||||
// Create a release to view
|
||||
tag := fmt.Sprintf("fgj-view-test-%d", time.Now().UnixNano())
|
||||
tag := fmt.Sprintf("fj-view-test-%d", time.Now().UnixNano())
|
||||
|
||||
createResult := env.RunCLI(
|
||||
"--hostname", env.Hostname,
|
||||
|
|
@ -1149,7 +1149,7 @@ func TestCLIAPIGet(t *testing.T) {
|
|||
t.Fatalf("expected repo name %q in JSON output, got %v", env.RepoName, data["name"])
|
||||
}
|
||||
|
||||
t.Logf("Successfully retrieved repo info via fgj api GET")
|
||||
t.Logf("Successfully retrieved repo info via fj api GET")
|
||||
}
|
||||
|
||||
func TestCLIAPIPostAndDelete(t *testing.T) {
|
||||
|
|
@ -1162,7 +1162,7 @@ func TestCLIAPIPostAndDelete(t *testing.T) {
|
|||
"api", endpoint,
|
||||
"-X", "POST",
|
||||
"-f", "title=[FGJ E2E Test] API Post Test",
|
||||
"-f", "body=Created via fgj api command",
|
||||
"-f", "body=Created via fj api command",
|
||||
)
|
||||
|
||||
if result.ExitCode != 0 {
|
||||
|
|
@ -1182,7 +1182,7 @@ func TestCLIAPIPostAndDelete(t *testing.T) {
|
|||
issueNum := int64(issueNumber)
|
||||
defer env.CleanupIssue(issueNum)
|
||||
|
||||
t.Logf("Successfully created issue #%d via fgj api POST", issueNum)
|
||||
t.Logf("Successfully created issue #%d via fj api POST", issueNum)
|
||||
}
|
||||
|
||||
// ===== Structured Error Output =====
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue