[Notes] [Git][BuildStream/buildstream][workspace_list_error_message] Deleted 1 commit: Fixed workspace list error message



Title: GitLab

Phillip Smyth pushed to branch workspace_list_error_message at BuildStream / buildstream

WARNING: The push did not contain any new commits, but force pushed to delete the commits and changes below.

Deleted commits:

2 changed files:

Changes:

  • buildstream/_stream.py
    ... ... @@ -641,6 +641,9 @@ class Stream():
    641 641
                 }
    
    642 642
                 workspaces.append(workspace_detail)
    
    643 643
     
    
    644
    +        if not workspaces:
    
    645
    +            workspaces = "No workspaces found"
    
    646
    +
    
    644 647
             _yaml.dump({
    
    645 648
                 'workspaces': workspaces
    
    646 649
             })
    

  • tests/frontend/cross_junction_workspace.py
    ... ... @@ -93,9 +93,10 @@ def test_close_cross_junction(cli, tmpdir):
    93 93
         result.assert_success()
    
    94 94
     
    
    95 95
         loaded = _yaml.load_data(result.output)
    
    96
    -    assert isinstance(loaded.get('workspaces'), list)
    
    97
    -    workspaces = loaded['workspaces']
    
    98
    -    assert len(workspaces) == 0
    
    96
    +    if not loaded['workspaces'] == "No workspaces found":
    
    97
    +        assert isinstance(loaded.get('workspaces'), list)
    
    98
    +        workspaces = loaded['workspaces']
    
    99
    +        assert len(workspaces) == 0
    
    99 100
     
    
    100 101
     
    
    101 102
     def test_close_all_cross_junction(cli, tmpdir):
    
    ... ... @@ -112,6 +113,7 @@ def test_close_all_cross_junction(cli, tmpdir):
    112 113
         result.assert_success()
    
    113 114
     
    
    114 115
         loaded = _yaml.load_data(result.output)
    
    115
    -    assert isinstance(loaded.get('workspaces'), list)
    
    116
    -    workspaces = loaded['workspaces']
    
    117
    -    assert len(workspaces) == 0
    116
    +    if not loaded['workspaces'] == "No workspaces found":
    
    117
    +        assert isinstance(loaded.get('workspaces'), list)
    
    118
    +        workspaces = loaded['workspaces']
    
    119
    +        assert len(workspaces) == 0



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]