-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Vasu1105 <vjagdle@progress.com>
- Loading branch information
Vasu1105
committed
Feb 28, 2024
1 parent
5fbf605
commit acbee5c
Showing
14 changed files
with
79 additions
and
147 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 |
---|---|---|
|
@@ -42,6 +42,6 @@ def build_instruction(command) | |
arr << command | ||
end.join("\s") | ||
end | ||
end | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
# frozen_string_literal: true | ||
require_relative "spec_helper" | ||
|
||
RSpec.describe TrainPlugins::K8sContainer do | ||
it "has a version number" do | ||
expect(TrainPlugins::K8sContainer::VERSION).not_to be nil | ||
end | ||
end |
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
7 changes: 4 additions & 3 deletions
7
spec/train/k8s/kubectl_exec_client_spec.rb → ...k8s-container/kubectl_exec_client_spec.rb
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 @@ | ||
# frozen_string_literal: true | ||
require_relative "../spec_helper" | ||
require "train-k8s-container/transport" | ||
|
||
RSpec.describe TrainPlugins::K8sContainer::Transport do | ||
# let(:platform_name) { Train::K8s::Container::Platform::PLATFORM_NAME } | ||
let(:options) { { pod: "shell-demo", container_name: "nginx", namespace: "default" } } | ||
let(:kube_client) { double(TrainPlugins::K8sContainer::KubectlExecClient) } | ||
let(:shell_op) { Train::Extras::CommandResult.new(stdout, stderr, exitstatus) } | ||
|
||
# describe ".name" do | ||
# it "registers the transport aginst the platform" do | ||
# expect(Train::Plugins.registry[platform_name]).to eq(described_class) | ||
# end | ||
# end | ||
|
||
let(:stdout) { "Linux\n" } | ||
let(:stderr) { "" } | ||
let(:exitstatus) { 0 } | ||
before do | ||
allow(TrainPlugins::K8sContainer::KubectlExecClient).to receive(:new).with(**options).and_return(kube_client) | ||
allow(kube_client).to receive(:execute).with("uname").and_return(shell_op) | ||
end | ||
|
||
subject { described_class.new(options) } | ||
describe "#options" do | ||
it "sets the options" do | ||
expect(subject.options).to include(options) | ||
end | ||
end | ||
|
||
describe "#connection" do | ||
it "should return the connection object" do | ||
expect(subject.connection).to be_a(TrainPlugins::K8sContainer::Connection) | ||
end | ||
end | ||
|
||
end | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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