-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from scrapli/transport_overhaul
Transport overhaul (and then some...)
- Loading branch information
Showing
143 changed files
with
5,122 additions
and
2,792 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package cfg_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/scrapli/scrapligo/cfg" | ||
"github.com/scrapli/scrapligo/driver/network" | ||
) | ||
|
||
func createCfgDriver(t *testing.T, d *network.Driver, platform string) *cfg.Cfg { | ||
openErr := d.Open() | ||
if openErr != nil { | ||
t.Fatalf("failed opening driver: %v", openErr) | ||
} | ||
|
||
c, cfgErr := cfg.NewCfgDriver(d, platform) | ||
|
||
if cfgErr != nil { | ||
t.Fatalf("failed creating cfg test device: %v", cfgErr) | ||
} | ||
|
||
prepareErr := c.Prepare() | ||
|
||
if prepareErr != nil { | ||
t.Fatalf("failed running prepare method: %v", prepareErr) | ||
} | ||
|
||
return c | ||
} |
Oops, something went wrong.