def METHOD_NAME(mock_run, fs):
    mock_run.side_effect = [CalledProcessError(cmd="kubectl", returncode=1), None]
    fs.create_file(
        "/external_resources/00-common/10-foo/30-hpa.yaml",
        contents="blah: blah",
    )
    fs.create_file(
        "/external_resources/00-common/10-foo/40-service.yaml",
        contents="blah: blah",
    )
    assert main("/external_resources") == 1
    assert not os.path.exists(
        "/external_resources/.applied/00-common/10-foo/30-hpa.yaml"
    )
    assert os.path.exists(
        "/external_resources/.applied/00-common/10-foo/40-service.yaml"
    )