mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +00:00
Fix lint errors in juju kubernetes master and e2e charms
This commit is contained in:
parent
6dab46e3fb
commit
40f918dc91
@ -14,14 +14,11 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
from charms import layer
|
from charms import layer
|
||||||
from charms.layer import snap
|
from charms.layer import snap
|
||||||
|
|
||||||
from charms.reactive import hook
|
from charms.reactive import hook
|
||||||
from charms.reactive import is_state
|
from charms.reactive import is_state
|
||||||
from charms.reactive import remove_state
|
|
||||||
from charms.reactive import set_state
|
from charms.reactive import set_state
|
||||||
from charms.reactive import when
|
from charms.reactive import when
|
||||||
from charms.reactive import when_not
|
from charms.reactive import when_not
|
||||||
@ -30,7 +27,6 @@ from charmhelpers.core import hookenv
|
|||||||
|
|
||||||
from shlex import split
|
from shlex import split
|
||||||
|
|
||||||
from subprocess import call
|
|
||||||
from subprocess import check_call
|
from subprocess import check_call
|
||||||
from subprocess import check_output
|
from subprocess import check_output
|
||||||
|
|
||||||
|
25
cluster/juju/layers/kubernetes-master/Makefile
Normal file
25
cluster/juju/layers/kubernetes-master/Makefile
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/make
|
||||||
|
|
||||||
|
all: lint unit_test
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
@rm -rf .tox
|
||||||
|
|
||||||
|
.PHONY: apt_prereqs
|
||||||
|
apt_prereqs:
|
||||||
|
@# Need tox, but don't install the apt version unless we have to (don't want to conflict with pip)
|
||||||
|
@which tox >/dev/null || (sudo pip install tox)
|
||||||
|
@sudo apt-get install -y python-pip python-flake8 python3-flake8 flake8
|
||||||
|
|
||||||
|
.PHONY: lint
|
||||||
|
lint: apt_prereqs
|
||||||
|
@tox --notest
|
||||||
|
@flake8 $(wildcard hooks reactive lib unit_tests tests)
|
||||||
|
@charm proof
|
||||||
|
|
||||||
|
.PHONY: unit_test
|
||||||
|
unit_test: apt_prereqs
|
||||||
|
@echo Starting tests...
|
||||||
|
tox
|
@ -441,7 +441,6 @@ def addons_ready():
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@when('loadbalancer.available', 'certificates.ca.available',
|
@when('loadbalancer.available', 'certificates.ca.available',
|
||||||
'certificates.client.cert.available')
|
'certificates.client.cert.available')
|
||||||
def loadbalancer_kubeconfig(loadbalancer, ca, client):
|
def loadbalancer_kubeconfig(loadbalancer, ca, client):
|
||||||
|
Loading…
Reference in New Issue
Block a user