Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for
airflow upgrade_check
in Astro CLI #2274 (#392)
* Support for `airflow upgrade_check` in Astro CLI #2274 * replace upgrade_check to upgrade-check * add install package when user run astro dev upgrade-check * enable printing logs during command is running * add docs * change wording * add small test * add more tests * Update docker_test.go * Update cmd/airflow.go Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com> Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
- Loading branch information
1 parent
a775e4a
commit db885e9
Showing
5 changed files
with
112 additions
and
12 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
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 |
---|---|---|
@@ -1,10 +1,37 @@ | ||
package docker | ||
|
||
import "testing" | ||
import ( | ||
"bufio" | ||
"bytes" | ||
"fmt" | ||
"github.com/docker/docker/api/types" | ||
"strings" | ||
"testing" | ||
) | ||
|
||
func TestExecVersion(t *testing.T) { | ||
err := Exec("version") | ||
if err != nil { | ||
t.Error(err) | ||
} | ||
} | ||
|
||
func TestExecPipe(t *testing.T) { | ||
var buf bytes.Buffer | ||
data := "" | ||
resp := &types.HijackedResponse{Reader: bufio.NewReader(strings.NewReader(data))} | ||
err := ExecPipe(*resp, &buf, &buf, &buf) | ||
fmt.Println(buf.String()) | ||
if err != nil { | ||
t.Error(err) | ||
} | ||
} | ||
|
||
func TestExecPipeNils(t *testing.T) { | ||
data := "" | ||
resp := &types.HijackedResponse{Reader: bufio.NewReader(strings.NewReader(data))} | ||
err := ExecPipe(*resp, nil, nil, nil) | ||
if err != nil { | ||
t.Error(err) | ||
} | ||
} |