forked from docker/machine
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make docker engine port configurable
Introduced -engine-port flag in create subcommand Extended drivers interface with a GetPort() method Updated all drivers with the new interface Updated provisioning to use GetPort() rather than parse GetURL() for the port Made driver options for setting the engine port emit a useful error message Fixes docker#3361 Signed-off-by: Wouter Dullaert <[email protected]> (cherry picked from commit edad5f7)
- Loading branch information
1 parent
49dfaa7
commit 82ba182
Showing
37 changed files
with
321 additions
and
98 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
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,29 @@ | ||
package azure | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/docker/machine/libmachine/drivers" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestGenericDockerPortDeprecationError(t *testing.T) { | ||
driver := NewDriver("default", "path") | ||
|
||
checkFlags := &drivers.CheckDriverOptions{ | ||
FlagsValues: map[string]interface{}{ | ||
"azure-subscription-id": "abcdef", | ||
"azure-docker-port": 12345, | ||
}, | ||
CreateFlags: driver.GetCreateFlags(), | ||
} | ||
|
||
err := driver.SetConfigFromFlags(checkFlags) | ||
|
||
assert.EqualError( | ||
t, | ||
err, | ||
"-azure-docker-port has been deprecated in favor of: -engine-port", | ||
"SetConfigFromFlags should throw an error when generic-docker-port is set", | ||
) | ||
} |
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
Oops, something went wrong.