Correct test_remote to support branchs without upstream

Change-Id: I6a78a2acc30813fe900155403bfb1dff0bfe0573