Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add astro dev * aliased to astro airflow * (#253)
* add astro dev * aliased to astro airflow * * move astro logs to astro deployment logs * update README.md * make astro airflow is deprecated command * replace astro airflow to astro dev * remove dev from airflow aliases
- Loading branch information
1 parent
fa2f167
commit 63a3998
Showing
7 changed files
with
125 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package cmd | ||
|
||
import ( | ||
"bytes" | ||
"testing" | ||
|
||
"github.com/spf13/cobra" | ||
) | ||
|
||
func executeCommandC(root *cobra.Command, args ...string) (c *cobra.Command, output string, err error) { | ||
buf := new(bytes.Buffer) | ||
root.SetArgs(args) | ||
c, err = root.ExecuteC() | ||
return c, buf.String(), err | ||
} | ||
|
||
func executeCommand(root *cobra.Command, args ...string) (output string, err error) { | ||
_, output, err = executeCommandC(root, args...) | ||
return output, err | ||
} | ||
|
||
func TestDevCommand(t *testing.T) { | ||
output, err := executeCommand(RootCmd, "dev") | ||
if output != "" { | ||
t.Errorf("Unexpected output: %v", output) | ||
} | ||
if err != nil { | ||
t.Errorf("Unexpected error: %v", err) | ||
} | ||
} | ||
|
||
func TestAirflowCommand(t *testing.T) { | ||
output, err := executeCommand(RootCmd, "airflow") | ||
if output != "" { | ||
t.Errorf("Unexpected output: %v", output) | ||
} | ||
if err != nil { | ||
t.Errorf("Unexpected error: %v", err) | ||
} | ||
} |
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,16 @@ | ||
package cmd | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
|
||
func TestDeploymentLogsCommand(t *testing.T) { | ||
output, err := executeCommand(deploymentRootCmd, "logs") | ||
if output != "" { | ||
t.Errorf("Unexpected output: %v", output) | ||
} | ||
if err != nil { | ||
t.Errorf("Unexpected error: %v", err) | ||
} | ||
} |
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,16 @@ | ||
package cmd | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
|
||
func TestLogsCommand(t *testing.T) { | ||
output, err := executeCommand(RootCmd, "logs") | ||
if output != "" { | ||
t.Errorf("Unexpected output: %v", output) | ||
} | ||
if err != nil { | ||
t.Errorf("Unexpected error: %v", err) | ||
} | ||
} |